Skip to content

Fix shader compilation error when writing to FOG when render_mode fog_disabled#115026

Merged
Repiteo merged 1 commit into
godotengine:masterfrom
rothej:fix-94567-fog-shader-compilation-with-fog-disabled
Jan 26, 2026
Merged

Fix shader compilation error when writing to FOG when render_mode fog_disabled#115026
Repiteo merged 1 commit into
godotengine:masterfrom
rothej:fix-94567-fog-shader-compilation-with-fog-disabled

Conversation

@rothej

@rothej rothej commented Jan 16, 2026

Copy link
Copy Markdown
Contributor

…fog_disabled.

Always declares FOG variable regardless of fog state. Previously, only declared fog if FOG_DISABLED was undefined. This caused errors if the code tried to write to fog later. Exists as a dummy variable when unused.

Fixes #94567.

…fog_disabled.

Always declares FOG variable regardless of fog state. Previously, only declared
fog if FOG_DISABLED was undefined. This caused errors if the code tried to
write to fog later. Exists as a dummy variable when unused.

Signed-off-by: Joshua Rothe <joshrothe@gmail.com>
@rothej rothej requested a review from a team as a code owner January 16, 2026 09:30
@AThousandShips AThousandShips changed the title Fixing shader compilation error when writing to FOG when render_mode … Fixing shader compilation error when writing to FOG when render_mode_fog_disabled Jan 16, 2026
@AThousandShips AThousandShips added bug topic:rendering topic:3d cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release cherrypick:4.6 Considered for cherry-picking into a future 4.6.x release labels Jan 16, 2026
@AThousandShips AThousandShips added this to the 4.x milestone Jan 16, 2026
@rothej rothej changed the title Fixing shader compilation error when writing to FOG when render_mode_fog_disabled Fixing shader compilation error when writing to FOG when render_mode fog_disabled Jan 16, 2026
@AThousandShips AThousandShips changed the title Fixing shader compilation error when writing to FOG when render_mode fog_disabled Fix shader compilation error when writing to FOG when render_mode fog_disabled Jan 16, 2026

@clayjohn clayjohn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great! Thanks

@akien-mga akien-mga changed the title Fix shader compilation error when writing to FOG when render_mode fog_disabled Fix shader compilation error when writing to FOG when render_mode fog_disabled Jan 16, 2026
@akien-mga akien-mga modified the milestones: 4.x, 4.7 Jan 16, 2026
@Repiteo Repiteo merged commit 4738ce7 into godotengine:master Jan 26, 2026
20 checks passed
@Repiteo

Repiteo commented Jan 26, 2026

Copy link
Copy Markdown
Contributor

Thanks!

@akien-mga akien-mga removed the cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release label Feb 9, 2026
rivie13 pushed a commit to rivie13/Phoenix-Agentic-Engine that referenced this pull request Feb 16, 2026
…r-compilation-with-fog-disabled

Fix shader compilation error when writing to `FOG` when `render_mode fog_disabled`
@Repiteo

Repiteo commented Mar 6, 2026

Copy link
Copy Markdown
Contributor

Cherry-picked for 4.6.2.

@Repiteo Repiteo removed the cherrypick:4.6 Considered for cherry-picking into a future 4.6.x release label Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shader compilation error occurs when writing to FOG in a custom shader that uses render_mode fog_disabled

5 participants