mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-13 22:10:27 +01:00
fix GL_REFLECTION_MAP texgen by not using tex matrix negation when lighting is not enabled (?). This fixes demos/cubemap as well as glean texCube test.
This commit is contained in:
parent
87d6028f28
commit
cb08dcbbf2
2 changed files with 9 additions and 5 deletions
|
|
@ -1970,6 +1970,8 @@ static void r200Enable( GLcontext *ctx, GLenum cap, GLboolean state )
|
|||
|
||||
case GL_LIGHTING:
|
||||
r200UpdateSpecular(ctx);
|
||||
/* for reflection map fixup - might set recheck_texgen for all units too */
|
||||
rmesa->NewGLState |= _NEW_TEXTURE;
|
||||
break;
|
||||
|
||||
case GL_LINE_SMOOTH:
|
||||
|
|
|
|||
|
|
@ -1304,11 +1304,13 @@ static GLboolean r200_validate_texgen( GLcontext *ctx, GLuint unit )
|
|||
case GL_REFLECTION_MAP_NV:
|
||||
rmesa->TexGenNeedNormals[unit] = GL_TRUE;
|
||||
tgi |= R200_TEXGEN_INPUT_EYE_REFLECT<<inputshift;
|
||||
set_texgen_matrix( rmesa, unit,
|
||||
(texUnit->TexGenEnabled & S_BIT) ? reflect : I,
|
||||
(texUnit->TexGenEnabled & T_BIT) ? reflect + 4 : I + 4,
|
||||
(texUnit->TexGenEnabled & R_BIT) ? reflect + 8 : I + 8,
|
||||
I + 12);
|
||||
/* pretty weird, must only negate when lighting is enabled? */
|
||||
if (ctx->Light.Enabled)
|
||||
set_texgen_matrix( rmesa, unit,
|
||||
(texUnit->TexGenEnabled & S_BIT) ? reflect : I,
|
||||
(texUnit->TexGenEnabled & T_BIT) ? reflect + 4 : I + 4,
|
||||
(texUnit->TexGenEnabled & R_BIT) ? reflect + 8 : I + 8,
|
||||
I + 12);
|
||||
break;
|
||||
|
||||
case GL_NORMAL_MAP_NV:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue