diff options
Diffstat (limited to 'drivers/gles3/shaders/copy.glsl')
-rw-r--r-- | drivers/gles3/shaders/copy.glsl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gles3/shaders/copy.glsl b/drivers/gles3/shaders/copy.glsl index 1952e201aa..a3cdb3a543 100644 --- a/drivers/gles3/shaders/copy.glsl +++ b/drivers/gles3/shaders/copy.glsl @@ -104,6 +104,10 @@ uniform sampler2D CbCr; //texunit:1 /* clang-format on */ +#ifdef USE_LOD +uniform float mip_level; +#endif + #if defined(USE_TEXTURE3D) || defined(USE_TEXTURE2DARRAY) uniform float layer; #endif @@ -190,8 +194,12 @@ void main() { color.gb = textureLod(CbCr, uv_interp, 0.0).rg - vec2(0.5, 0.5); color.a = 1.0; #else +#ifdef USE_LOD + vec4 color = textureLod(source, uv_interp, mip_level); +#else vec4 color = textureLod(source, uv_interp, 0.0); #endif +#endif #ifdef LINEAR_TO_SRGB // regular Linear -> SRGB conversion |