Sign in to follow this  

Material and vertex color

Recommended Posts

hello, when i enable GL_COLOR_MATERIAL, it seems like the material lightings don't count at all (for example, if i define a material that cant have any type of light (all 0's), its still lit as if it got diffuse of 1,1,1), but the color of the polygons is count and lit with the environment lightings. and if i disable GL_COLOR_MATERIAL, the material counts but the polygons color don't count (as if the polygons are white, even if they are not). what i want to do is to create a surface that is lit based on it's material properties, but still affected by the color of the polygons (better not be an additive merge). how do i do it? thanks.

Share this post

Link to post
Share on other sites
ill sharp my question a bit.
i got a water surface. i want the water to reflect only blue ambient light (so it will "naturally" appeare blue), but reflects all diffuse colors. the texture itself is in greyscale.
that way, the water appeares blue, but when lit they have white shine.

in addition, i want the water to have transperancy blend based on the alpha color of the vertex.

but so far i only managed to do one of these two:

1. i got the material effects properly, but the water had no transperancy and were not affected by the selected color at all.

2. the water had transperancy and color shade based on the vertex color, but the material properties i defined did nothing and had no effect.

obviously im missing something here.. it should be very simple, i just dont know the right property to enable/disable.

please help.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this