View Single Post
Old 02-14-07, 01:37 PM   #1
oc2k1
Registered User
 
Join Date: Aug 2006
Posts: 38
Default GLSL shadow2D() problem

I don't know if that is GLSL compiler bug. My driver version is 1.0.9746:

My thextur is generated by:
glTexImage2D (GL_TEXTURE_2D, 0,GL_DEPTH_COMPONENT , w, h, 0, GL_DEPTH_COMPONENT , GL_UNSIGNED_BYTE, NULL);
Bind as FBO with:
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT,GL_DE PTH_ATTACHMENT_EXT,GL_TEXTURE_2D,texture, 0);

uniform sampler2DShadow Shadowmap;
shadow2D(Shadowmap, vec3(parabol,0.0));

returns the same value than:

uniform sampler2D Shadowmap;
texture2D(Shadowmap, parabol));

The 3rd vec3 component of shadow2Ds firsts argument is always ignored. The shadow2D function shouldn't return something other than 0.0 or 1.0 (except for PCF) (or not?)
__________________
Will code GLSL for food.
oc2k1 is offline   Reply With Quote