Prechádzať zdrojové kódy

Expose getDepthClearValue on h3d/scene/RenderContext.hx

clementlandrin 1 mesiac pred
rodič
commit
af70b2e5ea
2 zmenil súbory, kde vykonal 5 pridanie a 1 odobranie
  1. 4 0
      h3d/scene/RenderContext.hx
  2. 1 1
      h3d/scene/Renderer.hx

+ 4 - 0
h3d/scene/RenderContext.hx

@@ -246,6 +246,10 @@ class RenderContext extends h3d.impl.RenderContext {
 		return cameraFrustumBuffer;
 	}
 
+	public function getDepthClearValue() {
+		return useReverseDepth ? 0 : 1;
+	}
+
 	public function uploadParams() {
 		fillParams(shaderBuffers, drawPass.shader, drawPass.shaders);
 		engine.uploadShaderBuffers(shaderBuffers, Params);

+ 1 - 1
h3d/scene/Renderer.hx

@@ -103,7 +103,7 @@ class Renderer extends hxd.impl.AnyProps {
 	}
 
 	function getDepthClearValue() {
-		return ctx.useReverseDepth ? 0 : 1;
+		return ctx.getDepthClearValue();
 	}
 
 	@:access(h3d.scene.Object)