mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Merge pull request #55676 from RandomShaper/fix_layered_lightmap_3.x
[3.x] Fix atlassed lightmaps not visible on GL ES 3
This commit is contained in:
@@ -1850,10 +1850,11 @@ void RasterizerSceneGLES3::_setup_light(RenderList::Element *e, const Transform
|
||||
RasterizerStorageGLES3::LightmapCapture *capture = storage->lightmap_capture_data_owner.getornull(e->instance->lightmap_capture->base);
|
||||
|
||||
if (lightmap && capture) {
|
||||
glActiveTexture(GL_TEXTURE0 + storage->config.max_texture_image_units - 10);
|
||||
if (e->instance->lightmap_slice == -1) {
|
||||
glActiveTexture(GL_TEXTURE0 + storage->config.max_texture_image_units - 10);
|
||||
glBindTexture(GL_TEXTURE_2D, lightmap->tex_id);
|
||||
} else {
|
||||
glActiveTexture(GL_TEXTURE0 + storage->config.max_texture_image_units - 11);
|
||||
glBindTexture(GL_TEXTURE_2D_ARRAY, lightmap->tex_id);
|
||||
state.scene_shader.set_uniform(SceneShaderGLES3::LIGHTMAP_LAYER, e->instance->lightmap_slice);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user