Author Topic: shaders  (Read 2058 times)

Offline fireside

  • double
  • *****
  • Posts: 605
    • View Profile
shaders
« on: April 08, 2009, 03:51:23 am »
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<-

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11776
    • View Profile
    • http://www.jpct.net
Re: shaders
« Reply #1 on: April 08, 2009, 07:14:43 am »
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.

Offline fireside

  • double
  • *****
  • Posts: 605
    • View Profile
Re: shaders
« Reply #2 on: April 08, 2009, 03:03:20 pm »
I'll see if I can find some GLSL tutorials on the net, then.
click here->Fireside 7 Games<-

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11776
    • View Profile
    • http://www.jpct.net
Re: shaders
« Reply #3 on: June 06, 2009, 01:24:31 pm »
I've added some demo code for a simple normal mapping shader to the wiki.