Skip to main content
gamedev.net
🔒 Locked

light the diffuse

Started by ipso 2 replies 350+ views
Original Post
ipso
ipso
Hi, My problems is this :- 1. I have a Vertex Buffer containing D3DFVF_XYZ & D3DFVF_TEX1 *only* (No diffuse color). 2. I have a greyscale texture. 3. I want to render the Vertex Buffer many times but changing the color of the final rendered texture. e.g change greyscale to redscale, bluescale etc etc. (At the moment i don''t mind if the color is global, but per vertex color would be nice). 4. The lights are switched off, which means I cannot change the material to change the color. 5. I could add D3DFVF_DIFFUSE to the vertex format, but I don''t want to lock the vertex buffer to change diffuse colors for every render. Do I have to use a vertex shader, and if so, what percentage of the user base would support it? Is there a way of setting the *default* diffuse color? I could then modulate texture color and diffuse color, and because there is no vertex diffuse color it will use the default. Or is there another way?? Thanks J-J-Jack the Groove
ipso
ipso
Thanks CrazedGenius
Metron
Metron
Another way is to split your data into different buffers that you feed to your renderer by passing them to different streams. You can then easily exchange the diffuse color stream with the needed data stream (ie. one for red, one for blue, ...)...
----------------------------------------http://www.sidema.be----------------------------------------

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.