[Mesa-dev] [Bug 31159] shadow problem in 0ad game

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Mar 7 15:14:38 PST 2011


https://bugs.freedesktop.org/show_bug.cgi?id=31159

--- Comment #2 from Philip Taylor <excors at gmail.com> 2011-03-07 15:14:38 PST ---
I see this bug with softpipe, but not with i965 (non-Gallium).

I don't have a simple test case, but I've observed the problem in the game is
where parts of the terrain are outside the far plane of the camera used for
generating the shadow depth texture.

I think that means the (s,t,r) texcoords used for the depth texture comparison
have r > 1.0. The depth texture sampled at (s,t) should have value 1.0, and r
should be clamped to [0, 1] (per the GL spec, for non-floating-point depth
textures), so the LEQUAL depth test should pass and the terrain should be
non-shadowed.

Looking at softpipe's sp_tex_sample.c, the p[] values passed into
sample_compare are often larger than 1.0, so it seems to me that something is
failing to correctly clamp the texcoords before sampling the texture.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the mesa-dev mailing list