Merge pull request #33779 from clayjohn/bugfixes_from_env_map_fix
Fix bugs introduced by IBL fixes
This commit is contained in:
commit
daefd4f047
2 changed files with 92 additions and 93 deletions
|
@ -1547,7 +1547,7 @@ FRAGMENT_SHADER_CODE
|
|||
#endif // !USE_SHADOW_TO_OPACITY
|
||||
|
||||
#ifdef BASE_PASS
|
||||
|
||||
{
|
||||
// IBL precalculations
|
||||
float ndotv = clamp(dot(normal, eye_position), 0.0, 1.0);
|
||||
vec3 f0 = F0(metallic, specular, albedo);
|
||||
|
@ -1638,7 +1638,6 @@ FRAGMENT_SHADER_CODE
|
|||
#endif // defined(USE_REFLECTION_PROBE1) || defined(USE_REFLECTION_PROBE2)
|
||||
|
||||
// environment BRDF approximation
|
||||
|
||||
{
|
||||
|
||||
#if defined(DIFFUSE_TOON)
|
||||
|
@ -1698,7 +1697,7 @@ FRAGMENT_SHADER_CODE
|
|||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
#endif //BASE PASS
|
||||
|
||||
//
|
||||
|
|
|
@ -1801,7 +1801,7 @@ void RasterizerStorageGLES3::sky_set_texture(RID p_sky, RID p_panorama, int p_ra
|
|||
glTexParameterf(texture->target, GL_TEXTURE_WRAP_S, GL_REPEAT);
|
||||
glTexParameterf(texture->target, GL_TEXTURE_WRAP_T, GL_REPEAT);
|
||||
glTexParameterf(texture->target, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
|
||||
glTexParameterf(texture->target, GL_TEXTURE_MAG_FILTER, GL_LINEAR_MIPMAP_LINEAR);
|
||||
glTexParameterf(texture->target, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
|
||||
if (config.srgb_decode_supported && texture->srgb && !texture->using_srgb) {
|
||||
|
||||
|
@ -2068,7 +2068,7 @@ void RasterizerStorageGLES3::sky_set_texture(RID p_sky, RID p_panorama, int p_ra
|
|||
shaders.cubemap_filter.bind();
|
||||
glActiveTexture(GL_TEXTURE0);
|
||||
glBindTexture(GL_TEXTURE_2D, sky->radiance);
|
||||
shaders.cubemap_filter.set_uniform(CubemapFilterShaderGLES3::SOURCE_MIP_LEVEL, lod - 1); //read from previous to ensure better blur
|
||||
shaders.cubemap_filter.set_uniform(CubemapFilterShaderGLES3::SOURCE_MIP_LEVEL, float(lod - 1)); //read from previous to ensure better blur
|
||||
shaders.cubemap_filter.set_uniform(CubemapFilterShaderGLES3::SOURCE_RESOLUTION, float(size));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue