ps.1.1
tex t0
add r1, v0, v1 //r1=diffuse+specular
mul r0, r1, t0
However, enabling specular lighting calculations with
d3dDevice->SetRenderState(D3DRS_SPECULARENABLE, true);
will add the specular color to the result AFTER the texture stages. Thus I will get
(diffuse color + specular color) * texture 0 color + specular
Is there any way I can disable the "color sum", yet still have the vertex pipeline calculate the specular color so I can use it in the texture stages?
[edited by - bakery2k1 on December 2, 2002 7:31:00 PM]
Specular color sum
I am attempting to evaluate:
(diffuse color + specular color) * texture 0 color
per pixel. Is there any way I can do this using the standard TextureStageStates? I am currently using a simple pixel shader:
You add the light. So you are modulating with greate than 255 Color.
I use this Shader
// t0.rgb BaseTexture
// v0 diffuse
// v1 specular
ps.1.1
tex t0
mad_sat r0, t0, v0, v1
I use this Shader
// t0.rgb BaseTexture
// v0 diffuse
// v1 specular
ps.1.1
tex t0
mad_sat r0, t0, v0, v1
You add the light. So you are modulating with greate than 255 Color.
I use this Shader
// t0.rgb BaseTexture
// v0 diffuse
// v1 specular
ps.1.1
tex t0
mad_sat r0, t0, v0, v1
I use this Shader
// t0.rgb BaseTexture
// v0 diffuse
// v1 specular
ps.1.1
tex t0
mad_sat r0, t0, v0, v1
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement