Skip to content

Commit

Permalink
Correct parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
felixpalmer committed Oct 11, 2024
1 parent 12b07e1 commit 4b4371d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion modules/core/src/passes/shadow-pass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,12 @@ export default class ShadowPass extends LayersPass {
layerIndex: number,
viewport: Viewport
): Parameters {
return {...layer.props.parameters, blend: false, depthCompare: 'always'};
return {
...layer.props.parameters,
blend: false,
depthWriteEnabled: true,
depthCompare: 'less-equal'
};
}

shouldDrawLayer(layer) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ export default class CollisionFilterPass extends LayersPass {
}

protected getLayerParameters(layer: Layer, layerIndex: number, viewport: Viewport): Parameters {
return {...layer.props.parameters, blend: false, depthCompare: 'always'};
return {
...layer.props.parameters,
blend: false,
depthWriteEnabled: true,
depthCompare: 'less-equal'
};
}

getShaderModuleProps() {
Expand Down

0 comments on commit 4b4371d

Please sign in to comment.