PDA

View Full Version : Radeon shadow2DProj - bug



ac
03-23-2005, 11:36 PM
I have problem with used shadow2DProj to Radeon 9500 and over. Possible i stuppid, but i know not how possible avoid the problem ?

Help me please.
Its my fp shader:


uniform sampler2D Texture0;
uniform sampler2D spotlight;

varying vec4 projlight;
varying vec4 IntensityLight;

varying vec2 glTexC;

void main(void)
{

vec4 tex0 = texture2D(Texture0, glTexC);

float lightspot = 0.0;
lightspot = shadow2DProj(spotlight, projlight).r; // problem. If kill it the string then shader will be work


gl_FragColor = vec4(0.33);

}

Relic
03-30-2005, 04:10 AM
Always check the error report in the compiler's log string.
On first sight: shadow2DProj() has a sampler2DShadow as first parameter, not sampler2D.
The initialization of lightspot = 0.0 is obsolete.

ac
03-31-2005, 09:28 PM
Thank you very much