vertex diffuse

Started by
0 comments, last by jollyjeffers 15 years, 8 months ago
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.
Advertisement
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 | MVP Profile | Developer Journal ]</small>

This topic is closed to new replies.

Advertisement