Hi everybody !
Do you know where I can find a tutorial about creating terrain decals with Shaders ?
By the way, where can I find a good tutorial on Shaders and Cg Shaders ?
I know nothing on shaders but it seems to be a way to put decals !
Hi everybody !
many ways todo this job.
- good looking big textures
- tiles for texturing
- combinition of both (possible with shaders)
search our JME Forum for "tile" or "tilemapping"
I am trying to understand shaders by myself and I have several questions :
- It seems that GLSL shaders dont' work well on my computer. Can I do the exactly same things with ARB shaders in jME?
- I want to use textures with ARB shaders but I can only pass float arguments. Is it possible to use textures in ARB shader. The LWJGLVertexProgramState doesn't show this kind of function. Should I modify it ?
Look at the Test-Classes in jme-souce.
You can find an bumpmapping-example that uses vp/fp.
Too bad the files are not Cg files
It seems necessary to learn the assembly syntax to use shaders !
Sorry for my noob questions ans thank you for your help
or buy a "new"(though a few years old would suffice) gfx card that can handle glsl.
and the Orange-book for the OpenGL Shading Language
OK, ok, you're both right !
But let me answer :
- I thought my GeForce card was not so bad (and not so old !) but it seems that it can't handle GLSL fragment shaders (and not vertex shaders, don't ask me why)
- I did read the GLSL cookbook which is, by the way, far better than Cg cookbook !
I WANT to use GLSL shaders but I also want make a game which can be used on most computers. When I see my model, "Dawn of war", which seems to use ARB shaders, goes ok on my computer …
you can develop shaders using nvidia CG and then compile to your favorite. (ARB for example)
That's what I want to do …
The compilation works well and I can use the generated scripts but it makes me return to my first question :
Joseph Beaufils said:
I want to use textures with ARB shaders but I can only pass float arguments. Is it possible to use textures in ARB shader. The LWJGLVertexProgramState doesn't show this kind of function. Should I modify it ?
OK, i understand…
do the following:
- create a TextureState
- create the Texture-Objects you want to use
- set the created Texture-Objects on TextureState
- set the created TextureState on your Spatial
- create your VertexProgramState- and FragmentProgramState-objects
- set the created VP and FP-states on your Spatial
look at SceneElement.setRenderState(…) for information
- attach to the Scene and ready.
hope this helps
Thank you XD
I will try it as soon as possible !