// JP opened flex table

Click to See Complete Forum and Search --> : Disabling Vertex Coloring


NastySlapper
May 8th, 2008, 09:27 PM
I would like to render vertices that contain diffuse data, but to disable vertex coloring. It seems that the following should work, but it doesn't:

SetRenderState(D3DRS_COLORVERTEX, FALSE);

What is the proper way to do this?

Lindley
May 9th, 2008, 08:37 AM
I only know OpenGL, but the basic principal should apply.....

In order to get any meaningful output from a render, you need a color assigned to each pixel. This color can be interpolated from each vertex, or it can be taken from a texture or other per-fragment source.

Since it is meaningless to want to render without color entirely, I assume you're saying you want per-vertex color to have no influence on fragment color. Typically this is done by setting a texture mode to something like "DECAL" or "REPLACE". I don't know what D3D calls it.

NastySlapper
May 9th, 2008, 07:29 PM
If you provide a vertex format that contains positions only you can render in the default diffuse color. So, I want this same functionality while reading vertices that contain color values; I simply want the color values ignored.

It may be that this isn't supported.

//JP added flex table