diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2021-03-04 13:59:49 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2021-03-08 19:25:16 +0300 |
commit | ba75ea8012084aa84ba8c9ac088b88a8dcf4fb21 (patch) | |
tree | 32610751177961885185afee8f4c4773ccda4ced /source/blender/draw/engines/eevee/shaders/common_uniforms_lib.glsl | |
parent | 6afe2d373a00a49a7a51cafec50d03ada0fe0743 (diff) |
EEVEE: Use Fullscreen maxZBuffer instead of halfres
This removes the need for per mipmap scalling factor and trilinear interpolation
issues. We pad the texture so that all mipmaps have pixels in the next mip.
This simplifies the downsampling shader too.
This also change the SSR radiance buffer as well in the same fashion.
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders/common_uniforms_lib.glsl')
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/common_uniforms_lib.glsl | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/common_uniforms_lib.glsl b/source/blender/draw/engines/eevee/shaders/common_uniforms_lib.glsl index a6c9eebaff2..24de4520207 100644 --- a/source/blender/draw/engines/eevee/shaders/common_uniforms_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/common_uniforms_lib.glsl @@ -2,7 +2,7 @@ layout(std140) uniform common_block { mat4 pastViewProjectionMatrix; - vec2 mipRatio[10]; /* To correct mip level texel misalignment */ + vec4 hizUvScale; /* To correct mip level texel misalignment */ /* Ambient Occlusion */ vec4 aoParameters[2]; /* Volumetric */ @@ -37,15 +37,15 @@ layout(std140) uniform common_block int prbIrradianceVisSize; float prbIrradianceSmooth; float prbLodCubeMax; - float prbLodPlanarMax; /* Misc*/ - int hizMipOffset; int rayType; float rayDepth; float alphaHashOffset; float alphaHashScale; + float pad6; float pad7; float pad8; + float pad9; }; /* rayType (keep in sync with ray_type) */ @@ -69,9 +69,3 @@ layout(std140) uniform common_block #define ssrQuality ssrParameters.x #define ssrThickness ssrParameters.y #define ssrPixelSize ssrParameters.zw - -vec2 mip_ratio_interp(float mip) -{ - float low_mip = floor(mip); - return mix(mipRatio[int(low_mip)], mipRatio[int(low_mip + 1.0)], mip - low_mip); -} |