diff options
author | clayjohn <claynjohn@gmail.com> | 2020-03-30 10:42:45 -0700 |
---|---|---|
committer | clayjohn <claynjohn@gmail.com> | 2020-03-30 10:42:45 -0700 |
commit | be9235e4991d4fe5499dd3bd6b769e2902a70867 (patch) | |
tree | e33cd2f7db652c994d0f82af7bed2f7e6f3f7653 /servers/rendering/rasterizer_rd/shaders | |
parent | 8f47ca8fe4c16d5190572389ec6041efeae46726 (diff) |
Invert subpass cubemap z direction
Diffstat (limited to 'servers/rendering/rasterizer_rd/shaders')
-rw-r--r-- | servers/rendering/rasterizer_rd/shaders/sky.glsl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/servers/rendering/rasterizer_rd/shaders/sky.glsl b/servers/rendering/rasterizer_rd/shaders/sky.glsl index 3f433eb2ee..469925839a 100644 --- a/servers/rendering/rasterizer_rd/shaders/sky.glsl +++ b/servers/rendering/rasterizer_rd/shaders/sky.glsl @@ -141,15 +141,15 @@ void main() { vec4 quarter_res_color = vec4(1.0); #ifdef USE_CUBEMAP_PASS - float using_cubemap = 1.0; + vec3 inverted_cube_normal = cube_normal; + inverted_cube_normal.z *= -1.0; #ifdef USES_HALF_RES_COLOR - half_res_color = texture(samplerCube(half_res, material_samplers[SAMPLER_LINEAR_WITH_MIPMAPS_CLAMP]), cube_normal); + half_res_color = texture(samplerCube(half_res, material_samplers[SAMPLER_LINEAR_WITH_MIPMAPS_CLAMP]), inverted_cube_normal); #endif #ifdef USES_QUARTER_RES_COLOR - quarter_res_color = texture(samplerCube(quarter_res, material_samplers[SAMPLER_LINEAR_WITH_MIPMAPS_CLAMP]), cube_normal); + quarter_res_color = texture(samplerCube(quarter_res, material_samplers[SAMPLER_LINEAR_WITH_MIPMAPS_CLAMP]), inverted_cube_normal); #endif #else - float using_cubemap = 0.0; #ifdef USES_HALF_RES_COLOR half_res_color = textureLod(sampler2D(half_res, material_samplers[SAMPLER_LINEAR_CLAMP]), uv, 0.0); #endif |