Main Menu

shaders

Started by fireside, April 08, 2009, 03:51:23 AM

Previous topic - Next topic

fireside

I just read the shader entry in the wiki.  I don't know anything about this yet, but I was wondering how you assign a shader to a certain texture, like a bump map?
click here->Fireside 7 Games<-

EgonOlsen

You don't assign it directly to a texture. You assign it to the pipeline, i.e. you enable your shader and it's used on all polygons from there on until you disable it. To use a texture in a shader, it has to be assigned to a texture stage (jPCT does this for you) and you have to make your shader know it (that's your part). There are a lot of GLSL examples and tutorials that show how to do it.

fireside

I'll see if I can find some GLSL tutorials on the net, then.
click here->Fireside 7 Games<-

EgonOlsen

I've added some demo code for a simple normal mapping shader to the wiki.