DeTan
14-11-2007 15:07:27
Hi,
I was trying to bind a shader parameter to surface_*_colour. I was unable to get it working with default_params and I didn't find them in the "Fragment Program Properties Editor". How can I bind the material diffuse, specular and ambient parameters in the shader?
I'm using CE version.
Regards!
you have to code diffuse, specular and ambient into the shader. Shaders for the most part ignore the lights in your scene. You have to describe both the lighting and material properties directly in the shader.
you could look at existing shaders to see how other people did it. There are plenty of shaders around that have at least one of those features in.
Shaders are often overlooked by engine developers who often take for granted that they can code but most people that will want to use them can't. So often like in ogres case everything you need is there, but actually being able to do anything with them on your own is really tough
Lioric
14-11-2007 16:40:38
The surface* parameters are part of the upcoming release that uses Eihort as default (to be available soon, CE version might be updated later)
DeTan
14-11-2007 18:37:56
Thanks for the replies,
Describing lighting and material properties directly is not what I had in mind, but I understand that I don't have much choice right now (looking forward for the upcoming release

).
I wanted to write a set of shaders and let the artists change the colors and textures. I would tell them "If you use diffuse, specular and bump maps you use this shader, if you only have bump with no diffuse, use this one".