Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move uniform variables up in the gles3/scene.glsl template so that they are available within the #GLOBALS scope #100125

Merged
merged 1 commit into from
Dec 14, 2024

Conversation

alessand10
Copy link
Contributor

@alessand10 alessand10 commented Dec 6, 2024

This PR should:
Resolve #100080

As well as prevent future issues in which the following uniform variables are needed (yet not defined) within '#GLOBALS'.

The following 3 uniform variables were previously defined after '#GLOBALS' within the fragment shader of 'drivers/gles3/shaders/scene.glsl':

uniform highp mat4 world_transform;
uniform highp uint instance_offset; 
uniform highp uint model_flags;

But there may be instances in which these variables are needed within '#GLOBALS'. To keep consistency with the vertex shader in the same file, I have moved these definitions to just below the

#ifdef USE_MULTIVIEW
...
#endif

Preprocessor directive.

@alessand10 alessand10 requested a review from a team as a code owner December 6, 2024 22:53
@alessand10 alessand10 changed the title Moved uniform variables up within gles3/scene.glsl so that they are available within the '#GLOBALS' scope Moved uniform variables up in the gles3/scene.glsl template so that they are available within the '#GLOBALS' scope Dec 6, 2024
@AThousandShips AThousandShips changed the title Moved uniform variables up in the gles3/scene.glsl template so that they are available within the '#GLOBALS' scope Move uniform variables up in the gles3/scene.glsl template so that they are available within the '#GLOBALS' scope Dec 7, 2024
@AThousandShips AThousandShips added this to the 4.x milestone Dec 7, 2024
@AThousandShips AThousandShips modified the milestones: 4.x, 4.4 Dec 8, 2024
@akien-mga akien-mga changed the title Move uniform variables up in the gles3/scene.glsl template so that they are available within the '#GLOBALS' scope Move uniform variables up in the gles3/scene.glsl template so that they are available within the #GLOBALS scope Dec 14, 2024
@akien-mga akien-mga merged commit 736dcf7 into godotengine:master Dec 14, 2024
20 checks passed
@akien-mga
Copy link
Member

Thanks! And congrats for your first merged Godot contribution 🎉

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 with instance uniforms fails in compatibility
4 participants