Skip to main content
gamedev.net
🔒 Locked

vertex diffuse

Started by huaner Aug 25, 2008 at 10:49 PM 0 replies 550+ views
Original Post
huaner
huaner
hi: i use pixpiple render my secne.but, i found if i set gloabl ambient and diffuse of direction light to zero, i can see the vertex color of terrain. i thought this is black, but not.so i did't know if i set which rendrestade to result this. if i change it to shader, my vs light computation is:
Quote:
Out.color[0].rgb = gAmbient * matAmbient + In.color[0].rgb * gLightDiffuse * dot(normal, dir); Out.color[0].a = In.color[0].a;
this is black.
jollyjeffers
jollyjeffers
I'm not sure I follow your description. You're zeroing out your parameters and expecting a black output (which is a fair assumption) but you're getting some other value? I don't see how it could be the vertex diffuse property as fixed function lighting is bypassed by the presence of a vertex shader - even if that shader does nothing.

I'd suggest a single-frame capture using PIX and use the "pixel history" debugging feature to determine where the final colour originally came from. It'll show you the inputs and outputs for each computation.

hth
Jack
<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ |

Topic Locked

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

Sign in to reply to this topic.