[Bug 66067] Trine 2's fragment normal buffer is mixtextured on Radeon HD 6770 (Juniper)

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Sep 13 13:02:45 PDT 2015


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

--- Comment #31 from Daniel Scharrer <daniel at constexpr.org> ---
I have found another game that hits this: he Book of Unwritten Tales: The
Critter Chronicles. Again, my workaround works for me. Unlike Trine however,
this game ships its Cg shader sources as plain text files.

Changing the tex2Dproj() calls to use the correct overload by replacing
"tex2Dproj(cookieMap, IN.LightSpacePos)" with "tex2Dproj(cookieMap,
IN.LightSpacePos.xyw)" in kAGE_phong.cgfx and kAGE_phong_simple.cgfx fixes it
for me. I've sent an email to the developer so hopefully this will be fixed in
the game.

Meanwhile Trine is still broken on radeonsi. Since it works with fglrx, do we
know how it handles mismatched GL_TEXTURE_COMPARE_MODE and sampler in the
shader?

> I suspect that the Cg compiler always compiles tex2Dproj to a TEX instruction with the SHADOW2D target and relies on OpenGL implementations always transparently using normal sampling on non-depth non-stencil textures.

It selects between the 2D and SHADOW2D samplers based on the number of
components in the coordinate vector. This matches the documentation [1] which,
unlike the tutorial you quoted, makes no mention of the shadow test depending
on the texture format or compare mode.

[1] http://http.developer.nvidia.com/Cg/tex2Dproj.html

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20150913/d2d884aa/attachment.html>


More information about the dri-devel mailing list