Comparing version 0.0.107 to 0.0.108
{ | ||
"name": "ogl", | ||
"version": "0.0.107", | ||
"version": "0.0.108", | ||
"description": "WebGL Library", | ||
@@ -5,0 +5,0 @@ "exports": "./src/index.mjs", |
@@ -12,2 +12,3 @@ import { Camera } from '../core/Camera.js'; | ||
this.target = new RenderTarget(gl, { width, height }); | ||
this.targetUniform = { value: this.target.texture }; | ||
@@ -37,3 +38,3 @@ this.depthProgram = new Program(gl, { | ||
mesh.program.uniforms[uniformView] = { value: this.light.viewMatrix }; | ||
mesh.program.uniforms[uniformTexture] = { value: this.target.texture }; | ||
mesh.program.uniforms[uniformTexture] = this.targetUniform; | ||
} | ||
@@ -64,2 +65,7 @@ | ||
setSize({ width = 1024, height = width }) { | ||
this.target = new RenderTarget(this.gl, { width, height }); | ||
this.targetUniform.value = this.target.texture; | ||
} | ||
render({ scene }) { | ||
@@ -66,0 +72,0 @@ // For depth render, replace program with depth override. |
330871
9084