Skip to content

Commit

Permalink
fix: lint + misstakes
Browse files Browse the repository at this point in the history
fix: program parameters
  • Loading branch information
eXponenta authored Oct 7, 2024
1 parent 8845729 commit f3fb71f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/renderers/WebGLRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ class WebGLRenderer {

state = new WebGLState( _gl, extensions );

if ( capabilities.reverseDepthBuffer && reverseDepthBuffer ) {
if ( capabilities.reverseDepthBuffer && reverseDepthBuffer ) {

state.buffers.depth.setReversed( true );

Expand Down Expand Up @@ -1982,7 +1982,7 @@ class WebGLRenderer {

// common camera uniforms

const reverseDepthBuffer = state.depth.getReversed ();
const reverseDepthBuffer = state.buffers.depth.getReversed();

if ( reverseDepthBuffer ) {

Expand Down
2 changes: 1 addition & 1 deletion src/renderers/webgl/WebGLPrograms.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ function WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities
const programs = [];

const logarithmicDepthBuffer = capabilities.logarithmicDepthBuffer;
const reverseDepthBuffer = capabilities.reverseDepthBuffer;
const SUPPORTS_VERTEX_TEXTURES = capabilities.vertexTextures;

let precision = capabilities.precision;
Expand Down Expand Up @@ -109,6 +108,7 @@ function WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities
}

const currentRenderTarget = renderer.getRenderTarget();
const reverseDepthBuffer = renderer.state.buffers.depth.getReversed();

const IS_INSTANCEDMESH = object.isInstancedMesh === true;
const IS_BATCHEDMESH = object.isBatchedMesh === true;
Expand Down
3 changes: 2 additions & 1 deletion src/renderers/webgl/WebGLState.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ function WebGLState( gl, extensions ) {
currentDepthFunc = null;
currentDepthClear = null;
reversed = false;

}

};
Expand Down Expand Up @@ -1204,7 +1205,7 @@ function WebGLState( gl, extensions ) {
gl.depthMask( true );
gl.depthFunc( gl.LESS );

depthBuffer.setReversed ( false );
depthBuffer.setReversed( false );

gl.clearDepth( 1 );

Expand Down

0 comments on commit f3fb71f

Please sign in to comment.