Skip to content

Restrict textureGather shader function in Compatibility mode#117157

Merged
Repiteo merged 1 commit into
godotengine:masterfrom
Chaosus:shader_restrict_uncompatible_funcs
Mar 12, 2026
Merged

Restrict textureGather shader function in Compatibility mode#117157
Repiteo merged 1 commit into
godotengine:masterfrom
Chaosus:shader_restrict_uncompatible_funcs

Conversation

@Chaosus
Copy link
Copy Markdown
Member

@Chaosus Chaosus commented Mar 6, 2026

I've detected that textureGather are not supported in Compatibility renderer mode and lead to shader crash even in the editor.

@Chaosus Chaosus requested a review from a team as a code owner March 6, 2026 19:14
@clayjohn
Copy link
Copy Markdown
Member

clayjohn commented Mar 7, 2026

Pack and unpack should not be removed

@Nintorch Nintorch added this to the 4.x milestone Mar 7, 2026
@Chaosus Chaosus force-pushed the shader_restrict_uncompatible_funcs branch from ea65e50 to 4e55814 Compare March 7, 2026 05:39
@Chaosus Chaosus changed the title Restrict some shader functions in compatibility mode Restrict 'textureGather' function in compatibility mode Mar 7, 2026
@Chaosus Chaosus force-pushed the shader_restrict_uncompatible_funcs branch from 4e55814 to 3085aaf Compare March 7, 2026 06:24
@Chaosus Chaosus changed the title Restrict 'textureGather' function in compatibility mode Restrict textureGather shader function in Compatibility mode Mar 7, 2026
@Chaosus Chaosus modified the milestones: 4.x, 4.7 Mar 7, 2026
Copy link
Copy Markdown
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

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

Tested locally, it works as expected. Code looks good to me.

For reference, textureGather() is only available in OpenGL 4.0 and later. It's not available in OpenGL ES 3.0 and WebGL 2.0, which would lead to shader compilation failures once you export to mobile/web platforms.

@Repiteo Repiteo merged commit 22a1404 into godotengine:master Mar 12, 2026
20 checks passed
@Repiteo
Copy link
Copy Markdown
Contributor

Repiteo commented Mar 12, 2026

Thanks!

@Chaosus Chaosus deleted the shader_restrict_uncompatible_funcs branch March 14, 2026 06:30
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.

6 participants