Use textureLod fo GLSL shaders

This commit is contained in:
Sascha Willems 2020-07-19 11:48:12 +02:00
parent 7805b8bbe0
commit f68c272695
4 changed files with 2 additions and 2 deletions

View file

@ -26,7 +26,7 @@ void main()
cR = vec3(ubo.invModel * vec4(cR, 0.0)); cR = vec3(ubo.invModel * vec4(cR, 0.0));
cR.y *= -1.0; cR.y *= -1.0;
vec4 color = texture(samplerCubeMapArray, vec4(cR, ubo.cubeMapIndex), ubo.lodBias); vec4 color = textureLod(samplerCubeMapArray, vec4(cR, ubo.cubeMapIndex), ubo.lodBias);
vec3 N = normalize(inNormal); vec3 N = normalize(inNormal);
vec3 L = normalize(inLightVec); vec3 L = normalize(inLightVec);

View file

@ -17,5 +17,5 @@ layout (location = 0) out vec4 outFragColor;
void main() void main()
{ {
outFragColor = texture(samplerCubeMapArray, vec4(inUVW, ubo.cubeMapIndex), ubo.lodBias); outFragColor = textureLod(samplerCubeMapArray, vec4(inUVW, ubo.cubeMapIndex), ubo.lodBias);
} }