Try to fix the lighting

This commit is contained in:
schmelczerandras 2020-07-25 14:20:11 +02:00
parent affb1b4f4f
commit e6782a9a98
7 changed files with 51 additions and 59 deletions

View file

@ -34,7 +34,7 @@ export class WebGl2Renderer implements Drawer {
new FragmentShaderOnlyProgram(this.gl, ...shaderSources[1]),
]);
this.distanceFieldFrameBuffer.renderScale = 1;
this.distanceFieldFrameBuffer.renderScale = 0.5;
this.lightingFrameBuffer.renderScale = 1;
try {
@ -55,7 +55,7 @@ export class WebGl2Renderer implements Drawer {
this.distanceFieldFrameBuffer.render(this.uniforms);
this.lightingFrameBuffer.render(
this.uniforms,
this.distanceFieldFrameBuffer.texture
this.distanceFieldFrameBuffer.colorTexture
);
this.stopwatch?.stop();
@ -96,6 +96,7 @@ export class WebGl2Renderer implements Drawer {
worldToDistanceUV,
cursorPosition,
ndcToWorld,
viewBoxSize: this.viewBox.size,
});
}