From 42e236be0dabf6cbda248e131d84459d8c268e6d Mon Sep 17 00:00:00 2001 From: gm-matthew <108370479+gm-matthew@users.noreply.github.com> Date: Sun, 9 Jun 2024 22:04:53 +0100 Subject: [PATCH] Add comment briefly explaining optimization --- Src/Graphics/New3D/R3DShaderCommon.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Src/Graphics/New3D/R3DShaderCommon.h b/Src/Graphics/New3D/R3DShaderCommon.h index df392ea..f1b39f1 100644 --- a/Src/Graphics/New3D/R3DShaderCommon.h +++ b/Src/Graphics/New3D/R3DShaderCommon.h @@ -263,6 +263,7 @@ vec4 textureR3D(usampler2D texSampler, ivec2 wrapMode, ivec2 texSize, ivec2 texP } else { + // if fLevel is 0, no need to mix with next mipmap level; slight performance boost return texBiLinear(texSampler, wrapMode, vec2(texSize0), texPos0, texCoord); } }