2
0
ncannasse 11 жил өмнө
parent
commit
50c7f9380f
1 өөрчлөгдсөн 2 нэмэгдсэн , 1 устгасан
  1. 2 1
      h3d/pass/Depth.hx

+ 2 - 1
h3d/pass/Depth.hx

@@ -4,6 +4,7 @@ class Depth extends Default {
 
 	var depthMapId : Int;
 	public var enableSky : Bool = false;
+	public var reduceSize : Int = 0;
 
 	public function new() {
 		super();
@@ -16,7 +17,7 @@ class Depth extends Default {
 	}
 
 	override function draw( passes ) {
-		var texture = tcache.allocTarget("depthMap", ctx, ctx.engine.width, ctx.engine.height);
+		var texture = tcache.allocTarget("depthMap", ctx, ctx.engine.width >> reduceSize, ctx.engine.height >> reduceSize);
 		ctx.engine.setTarget(texture);
 		ctx.engine.clear(enableSky ? 0 : 0xFF0000, 1);
 		passes = super.draw(passes);