Skip to content

Conversation

@VReaperV
Copy link
Contributor

Fixes #1440.

@slipher
Copy link
Member

slipher commented Nov 20, 2024

LGTM

/* Reflective specular setting is different here than in ProcessMaterialLightMapping(),
because we don't have cubemaps built yet at this point, but for the purposes of the material ordering there's no difference */
gl_lightMappingShaderMaterial->SetReflectiveSpecular( material->enableSpecularMapping && !( tr.refdef.rdflags & RDF_NOCUBEMAP ) );
gl_lightMappingShaderMaterial->SetReflectiveSpecular( glConfig2.reflectionMapping && material->enableSpecularMapping && !( tr.refdef.rdflags & RDF_NOCUBEMAP ) );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe there is a way to test for glConfig2.reflectionMapping when setting material->enableSpecularMapping earlier? Anyway, this is not blocking.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use specular mapping while reflection mapping is disabled. That's the broken case.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see, for some reasons my mind misread glConfig2.specularMapping instead. 😅️

@VReaperV VReaperV merged commit 2fe16f3 into DaemonEngine:master Nov 20, 2024
6 of 8 checks passed
@VReaperV VReaperV deleted the fix-specular-material branch November 20, 2024 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Material system: non-reflective specular mapping has no effect

3 participants