Skip to content

Conversation

BlueCube3310
Copy link
Contributor

@BlueCube3310 BlueCube3310 commented Aug 4, 2025

Fixes #85440

The cube face order used to be incorrect in the Compatibility renderer, compared to the Forward+ or mobile renderers.

Comparison:

Forward+ master PR
forward compat_old compat_new

MRP: gles-cubemap.zip

@BlueCube3310 BlueCube3310 requested a review from a team as a code owner August 4, 2025 11:33
@BlueCube3310 BlueCube3310 added this to the 4.x milestone Aug 4, 2025
Copy link
Member

@bruvzg bruvzg left a comment

Choose a reason for hiding this comment

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

Tested on macOS with Vulkan, Metal and GL, works as expected.

Should we consider this for 4.5? It's clearly a bug, but existing GL projects might expect this behavior. Also, what was face order in 3.x?

@BlueCube3310
Copy link
Contributor Author

It seems like the order in Compatibility was copied directly from 3.x:

const GLenum RasterizerSceneGLES3::_cube_side_enum[6] = {
GL_TEXTURE_CUBE_MAP_NEGATIVE_X,
GL_TEXTURE_CUBE_MAP_POSITIVE_X,
GL_TEXTURE_CUBE_MAP_NEGATIVE_Y,
GL_TEXTURE_CUBE_MAP_POSITIVE_Y,
GL_TEXTURE_CUBE_MAP_NEGATIVE_Z,
GL_TEXTURE_CUBE_MAP_POSITIVE_Z,
};

@BlueCube3310
Copy link
Contributor Author

Should we consider this for 4.5? It's clearly a bug, but existing GL projects might expect this behavior. Also, what was face order in 3.x?

I don't think so, there may be some regressions, so it would be better suited for 4.6

Copy link
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.

Code looks good to me.

Given this will change visuals in existing Compatibility projects that use custom cubemaps, we should only merge this for 4.6 (early on in the development cycle) and not cherry-pick it for 4.5.x.

@Repiteo Repiteo modified the milestones: 4.x, 4.6 Aug 6, 2025
@Repiteo Repiteo merged commit 747722d into godotengine:master Sep 19, 2025
39 of 40 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Sep 19, 2025

Thanks!

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.

Inconsistent cubemap faces order in Vulkan and OpenGL
4 participants