|
@@ -1276,11 +1276,8 @@ void RasterizerStorageGLES2::sky_set_texture(RID p_sky, RID p_panorama, int p_ra
|
|
|
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, resources.mipmap_blur_color, 0);
|
|
|
|
|
|
if (lod == 1) {
|
|
|
- //bind panorama for smaller lods
|
|
|
-
|
|
|
- glActiveTexture(GL_TEXTURE0);
|
|
|
- glBindTexture(GL_TEXTURE_CUBE_MAP, sky->radiance);
|
|
|
- shaders.cubemap_filter.set_conditional(CubemapFilterShaderGLES2::USE_SOURCE_PANORAMA, false);
|
|
|
+ // We set USE_DIRECT_WRITE to false for LOD levels 1 and up, so the shader will properly
|
|
|
+ // filter the roughness instead of just copying 1:1 from the source panorama.
|
|
|
shaders.cubemap_filter.set_conditional(CubemapFilterShaderGLES2::USE_DIRECT_WRITE, false);
|
|
|
shaders.cubemap_filter.bind();
|
|
|
}
|