Fix shadowLength config

This commit is contained in:
schmelczerandras 2020-09-19 20:10:12 +02:00
parent 8ca8f0ed70
commit b76c5a516d
2 changed files with 2 additions and 2 deletions

View file

@ -2,7 +2,7 @@ import { mat2d, vec2, vec3 } from 'gl-matrix';
export class UniformsProvider {
public ambientLight = vec3.fromValues(0.25, 0.15, 0.25);
public shadowLength = 150;
public shadowLength = 400;
private scaleWorldLengthToNDC = 1;
private transformWorldToNDC = mat2d.create();

View file

@ -47,7 +47,7 @@ export class WebGl2Renderer implements Renderer {
this.passes[RenderingPassName.pixel].isWorldInverted = v;
},
shadowLength: (v) => {
this.uniformsProvider.shadowLength;
this.uniformsProvider.shadowLength = v;
},
ambientLight: (v) => {
this.uniformsProvider.ambientLight = v;