mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-10-30 08:11:25 +00:00
enable stencil buffer
This commit is contained in:
parent
16e7ad1292
commit
7899a15bb9
1 changed files with 3 additions and 3 deletions
|
|
@ -92,10 +92,10 @@ class Renderer extends h3d.scene.Renderer {
|
|||
|
||||
override function render() {
|
||||
if (backBuffer == null) {
|
||||
depthBuffer = new DepthBuffer(cast ctx.engine.width / pixelRatio, cast ctx.engine.height / pixelRatio, Depth24);
|
||||
if (depthBuffer.format != Depth24) {
|
||||
depthBuffer = new DepthBuffer(cast ctx.engine.width / pixelRatio, cast ctx.engine.height / pixelRatio, Depth24Stencil8);
|
||||
if (depthBuffer.format != Depth24Stencil8) {
|
||||
depthBuffer.dispose();
|
||||
depthBuffer = new DepthBuffer(cast ctx.engine.width / pixelRatio, cast ctx.engine.height / pixelRatio, Depth24);
|
||||
depthBuffer = new DepthBuffer(cast ctx.engine.width / pixelRatio, cast ctx.engine.height / pixelRatio, Depth24Stencil8);
|
||||
}
|
||||
backBuffer = ctx.textures.allocTarget("backBuffer", cast ctx.engine.width / pixelRatio, cast ctx.engine.height / pixelRatio, false);
|
||||
backBuffer.depthBuffer = depthBuffer;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue