Fix exception when using Instancing with Fog in PBR#2391
Merged
yaRnMcDonuts merged 3 commits intomasterfrom Mar 12, 2025
Merged
Fix exception when using Instancing with Fog in PBR#2391yaRnMcDonuts merged 3 commits intomasterfrom
yaRnMcDonuts merged 3 commits intomasterfrom
Conversation
The fog code in PBRLighting.j3md is encountering the same issue that was reported before with Lighting.j3md : #1458 This PR should fix the issue.
Member
Author
|
I just realized that the variable name for the varying distance variable is different in PBRLighting.vert compared to Lighting.vert. And this means fog was broken in lighting.j3md. One is fog_distance and the other is fogDistance. So I'm fixing both varyings to be named fogDistance. I typically don't like using the _ character in regular variable names in shaders unless im working with a define (since defines are in all caps so _ character becomes useful since you can't use upper and lowercase to differentiate words in the variable name when its already all uppercase. For example I'd be okay with naming the corresponding define FOG_DISTANCE but the uniform should just be named fogDistance or FogDistance) |
…MaterialFog.glsllib
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The fog code in PBRLighting.j3md is encountering the same issue that was reported before with Lighting.j3md : #1458
This PR should fix the issue.