Skip to content

Conversation

@unixfan2
Copy link
Contributor

@unixfan2 unixfan2 commented Jan 8, 2026

Fixes #114606: Reading radiance in sky shader in compatibility mode does not work

Aligned texunit in shader to binding. See drivers/gles3/rasterizer_scene_gles3.cpp / _render_list_template:

glActiveTexture(GL_TEXTURE0 + config->max_texture_image_units - 2);
(...)
texture_to_bind = sky->radiance;
(...)
glBindTexture(GL_TEXTURE_CUBE_MAP, texture_to_bind);

Please note that I did not know what to do with half_res and quarter_res -- most likely they are also wrong or even not available in compatibility.

@unixfan2 unixfan2 requested a review from a team as a code owner January 8, 2026 22:52
@AThousandShips AThousandShips changed the title Fix sky radiance texunit in compatibility renderer (fixes #114606) Fix sky radiance texunit in compatibility renderer Jan 8, 2026
@akien-mga akien-mga added this to the 4.x milestone Jan 8, 2026
Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

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

Looks good.

Indeed the half and quarter res textures are only partially implementation and currently cause a shader compilation error if you try to use them. So they can be ignored for now since they don't work anyway

@clayjohn clayjohn modified the milestones: 4.x, 4.7 Jan 9, 2026
@Repiteo Repiteo merged commit cfc5ec9 into godotengine:master Jan 26, 2026
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Jan 26, 2026

Thanks! Congratulations on your first merged 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.

Reading radiance in sky shader in compatibility mode does not work

4 participants