瀏覽代碼

added reduceSize

ncannasse 11 年之前
父節點
當前提交
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);