diff --git a/Content/core/shaders/pbr.mshdr b/Content/core/shaders/pbr.mshdr index 00531e55..8b9eeccb 100644 --- a/Content/core/shaders/pbr.mshdr +++ b/Content/core/shaders/pbr.mshdr @@ -196,6 +196,11 @@ Fragment return texture( target, vs_out.vTexCoord.xy ).rgb; } + vec3 sampleLod( sampler2D target ) + { + return textureLod( target, vs_out.vTexCoord.xy, 0 ).rgb; + } + float luminance(vec3 v) { return dot(v, vec3(0.2126f, 0.7152f, 0.0722f)); @@ -216,7 +221,7 @@ Fragment float roughness = sampleTexture( roughnessTexture ).r; float ao = sampleTexture( ambientOcclusionTexture ).r; - vec3 vNormalTS = sampleTexture( normalTexture ); + vec3 vNormalTS = sampleLod( normalTexture ); vNormalTS = normalize( vNormalTS * 2.0 - 1.0 ); vec3 viewDir = normalize( vs_out.vCameraTS - vs_out.vPositionTS );