Browse Source

added reduceSize

ncannasse 11 years ago
parent
commit
50c7f9380f
1 changed files with 2 additions and 1 deletions
  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);