hiya, I am expanding my app, now after some playing with reflections and refractions, i'd like to add shades and colors, but for so doing, i need to get the color values of the vertices, and the "illumination" level. How do i pass the color to the shader? I think in the shader will be something like
vec4 outColor = gl_Color; but in OpenSG? A simple ->setColors(red) would do the trick? Regarding the illumination level, it should be a simple float, ranging [0,1], telling me how much light is hitting the point... where to store that value per vertex? is there an unused slot that i can use to my convenience? Something like a second texcoord set to use as a mere pipe between OSG and the shader. So my shader should retrive the value like: float lightlevel = gl_TexCoord[1].x; hope someone can help, enrico ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
