Skip to content

Fix fog in SPLighting.frag#2659

Merged
yaRnMcDonuts merged 1 commit intomasterfrom
yaRnMcDonuts-patch-1
Mar 28, 2026
Merged

Fix fog in SPLighting.frag#2659
yaRnMcDonuts merged 1 commit intomasterfrom
yaRnMcDonuts-patch-1

Conversation

@yaRnMcDonuts
Copy link
Copy Markdown
Member

Fixes an exception caused by duplicate declaration of the same variables when using fog.

The fog uniforms are already declared in the imported fog glsllib, so the declaration in the .frag shader causes an exception trying to re-declare them a second time.

Fixes an exception caused by duplicate declaration of the same variables when using fog. 

The fog uniforms are already declared in the imported fog glsllib, so the declaration in the .frag shader causes an exception trying to re-declare them a second time.
@yaRnMcDonuts yaRnMcDonuts added this to the v3.10.0 milestone Mar 27, 2026
@yaRnMcDonuts yaRnMcDonuts linked an issue Mar 27, 2026 that may be closed by this pull request
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the fog implementation in the SPLighting.frag shader by replacing manual uniform declarations and conditional fog logic with a centralized library import from MaterialFog.glsllib. A review comment identifies a redundant vec4 constructor call when calculating the final fog color, suggesting a simplification to improve code readability.

@yaRnMcDonuts yaRnMcDonuts merged commit 36fc367 into master Mar 28, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bad compile of "SPLighting.frag" with v3.10.0-alpha3 and fog

1 participant