jME shader help

Could someone get me on the right track with a jME shader tutorial.



I'm used to dealing with following constructs (for good or bad):

  • creating shader program
  • creating vertex and fragment shader
  • loading vertex and fragment source into shader
  • creating stateset
  • applying shader program to stateset
  • applying stateset to sub-tree in scene graph




  • I'm not used to seeing the texture combiner API functions … as done in jmeTest.TestBumpMapping.



    Do I need to do some sort of mental paradigm shift?

The combiner stuff is for fixed function texture tricks.  That test is not using shaders at all and you shouldn't need to touch texture combine state stuff for shader effects.

Doh! … need to read up on texture combiner functions in GL … have been doing by hand in shaders.


Any tutorials or documentation on shader API?

No, there is not much on shaders in our documentation.  It's an area of code that is going to get a lot more attention soon, but anything you might want to write up on it in the wiki would be appreciated.

Well, from what I've seen in the example source the API seems easy enough to follow … similar to other I've used.  But, it would help NOOBs that haven't been exposed to it.

I've been away on some other tasks for a couple of months … C++ world.



Has anyone added a shader tutorial?

Contributions are always appreciated and that one would be greatly appreciated by many, myself included. :slight_smile:

i would like to know about the jme shaders as well~ havent been using any of that part~

jME shaders are not some kind of special jME thing… They are just GLSL/ARB shaders so you should be able to find lots of information on the net about syntax and functions, etc.