소스 검색

Fix bug with lod

Popov72 5 년 전
부모
커밋
5ada114b5e
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/Materials/Node/Blocks/Fragment/PBR/reflectionBlock.ts

+ 1 - 1
src/Materials/Node/Blocks/Fragment/PBR/reflectionBlock.ts

@@ -272,7 +272,7 @@ export class ReflectionBlock extends ReflectionTextureBaseBlock {
         code += `
             vec4 ${finalColorVarName} = vec4(0.);
 
-            vec3 ${varInfos} = vec3(${this.texture!.getSize().width}., ${this._formatNumberForGLSL(this.texture!.lodGenerationScale)}, ${this._formatNumberForGLSL(this.texture!.lodGenerationScale)});
+            vec3 ${varInfos} = vec3(${this.texture!.getSize().width}., ${this._formatNumberForGLSL(this.texture!.lodGenerationScale)}, ${this._formatNumberForGLSL(this.texture!.lodGenerationOffset)});
 
             #if defined(${this._defineLODReflectionAlpha}) && !defined(${this._defineSkyboxName})
                 float ${varLOD} = getLodFromAlphaG(${varInfos}.x, alphaG, NdotVUnclamped);