[Mesa-dev] [Bug 31159] swrast: shadow problem in 0ad game
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Mar 8 06:32:23 PST 2011
https://bugs.freedesktop.org/show_bug.cgi?id=31159
--- Comment #10 from Philip Taylor <excors at gmail.com> 2011-03-08 06:32:23 PST ---
Created an attachment (id=44230)
View: https://bugs.freedesktop.org/attachment.cgi?id=44230
Review: https://bugs.freedesktop.org/review?bug=31159&attachment=44230
swrast patch
This adds clamping to swrast's sample_depth_texture, but there's another bug:
With GL_LEQUAL, shadow_compare correctly returns 1 if coord <= depthSample,
whereas shadow_compare4 returns 0 if depthXX <= coord (for all XX). Looks like
compare4 is trying to flip the conditional, but flipping <= gives > not >=, so
it's wrong when e.g. depthXX == coord == 1. Fixing this (plus the clamping)
makes the shadows work for me in swrast.
Also, I noticed the GL_ALWAYS case in shadow_compare4 differs from
shadow_compare and seems wrong. Also the default case reports the wrong
function name and the return value differs from shadow_compare. So I've tried
to fix those as well.
Mesa/master softpipe and llvmpipe both fix the shadow bug for me too.
--
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