|
|
Error with vecLight? "Jumpy"
#120008
03/28/07 23:15
03/28/07 23:15
|
Joined: Mar 2006
Posts: 2,503 SC, United States
xXxGuitar511
OP
Expert
|
OP
Expert
Joined: Mar 2006
Posts: 2,503
SC, United States
|
I added vecLight to my HLSL shader (matts normalmapping shader - improved!), and I get strange results.
My model is animated, and I think this might have something to do with it. When I walk in a dark area, my model stays dark. But when I walk into a lit area, my model flashes between green (the color of the light), and white. Sometimes it ends on the right color, other it ends on white.
I'm using a flat surface, so it's not picking up light from "cracks" in the floor. It's similar to as if the floor_range was too short, but thats not the case.
Anybody else have problems like this?
xXxGuitar511 - Programmer
|
|
|
Re: Error with vecLight? "Jumpy"
[Re: xXxGuitar511]
#120009
03/29/07 00:46
03/29/07 00:46
|
Joined: Mar 2006
Posts: 2,503 SC, United States
xXxGuitar511
OP
Expert
|
OP
Expert
Joined: Mar 2006
Posts: 2,503
SC, United States
|
I'm also having trouble with vecAmbient...
I have the values set in the material, but It always returns a 1.0f for all the variables in the vector.
Such as: float4 result = color * vecAmbient;
result will always = color.
xXxGuitar511 - Programmer
|
|
|
Re: Error with vecLight? "Jumpy"
[Re: xXxGuitar511]
#120010
03/29/07 06:44
03/29/07 06:44
|
Joined: Aug 2006
Posts: 652 Netherlands
bstudio
User
|
User
Joined: Aug 2006
Posts: 652
Netherlands
|
did you predefine the vecAmbient?
BASIC programmers never die, they GOSUB and don't RETURN.
|
|
|
Re: Error with vecLight? "Jumpy"
[Re: xXxGuitar511]
#120012
03/30/07 06:45
03/30/07 06:45
|
Joined: Aug 2006
Posts: 652 Netherlands
bstudio
User
|
User
Joined: Aug 2006
Posts: 652
Netherlands
|
yeah, well I know from experience that it's usually the small and easy things you forget. Try to output the vecAmbient en check what value it passes, that way maybe you'll see why it always outputs 1.0f
BASIC programmers never die, they GOSUB and don't RETURN.
|
|
|
Re: Error with vecLight? "Jumpy"
[Re: bstudio]
#120013
03/31/07 04:07
03/31/07 04:07
|
Joined: Mar 2006
Posts: 2,503 SC, United States
xXxGuitar511
OP
Expert
|
OP
Expert
Joined: Mar 2006
Posts: 2,503
SC, United States
|
I can't think of any way to output it. I'm going to try dividing it though. The manual says its values should be 0-1f, but maybe its 0-255f ?
xXxGuitar511 - Programmer
|
|
|
Re: Error with vecLight? "Jumpy"
[Re: xXxGuitar511]
#120014
04/01/07 02:58
04/01/07 02:58
|
Joined: Mar 2006
Posts: 2,503 SC, United States
xXxGuitar511
OP
Expert
|
OP
Expert
Joined: Mar 2006
Posts: 2,503
SC, United States
|
*Sigh* - I found the problem.
The model I was using was downloaded from Psionics website. The model already had a shader defined in MED skin settings, so those over-rid the ones I defined...
xXxGuitar511 - Programmer
|
|
|
|