hi, I'm trying to implement variance shadow map, but got the result with very sharp shadow edge. I checked the glsl code and found out it's because the variance( = moments.y - moments.x * moments.x) is always zero. so I suspect that somehow opengl failed to do linear filtering when fetching texels. Does anyone know why?
Code :GL_DEBUG(glTexImage2D(GL_TEXTURE_2D, 0, GL_RG32F, 512, 512, 0, GL_RG, GL_FLOAT, 0)); GL_DEBUG(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR)); GL_DEBUG(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR));