Skip to main content
GameDev.net gamedev.net
๐Ÿ”’ Locked

Disable diffuse color component

Started by Moltopulp Aug 8, 2002 at 3:02 PM 1 replies 250+ views
Original Post
Moltopulp
Moltopulp
Hi to all... always me... I have another question for you.. My vertex struct is the seguent: struct CUSTOMVERTEX { FLOAT x, y, z; DWORD color; // Diffuse color FLOAT u,v; FLOAT u1,v1; }; For some polygons i need to disable the diffuse color component.. Is it possible? I don''t want to change value in the vertex struct because i need to use the value in a second moment.. Thx, Alex
Evil Bill
Evil Bill
You''ll need to do:

  
pDevice->SetTextureStageState(0,D3DTSS_COLORARG1,D3DTA_TEXTURE);
pDevice->SetTextureStageState(0,D3DTSS_COLOROP,D3DTOP_SELECTARG1);

But why do you need to disable the diffuse?

HTH, Steve

Steve
DirectX Programmer
Soon to be the new Bill Gates
Member of the Unban Mindwipe Society (UMWS)
Moltopulp
Moltopulp
Thanks works great.
I need to disable diffuse color, because for some shader i need to do different pass and in some cases i need to render polygons without considering the diffuse color component.

Alex

Topic Locked

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

Sign in to reply to this topic.