瀏覽代碼

forced initializers

ncannasse 9 年之前
父節點
當前提交
94e2cc2e7d
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      h3d/shader/VolumeDecal.hx

+ 2 - 2
h3d/shader/VolumeDecal.hx

@@ -34,10 +34,10 @@ class VolumeDecal extends hxsl.Shader {
 
 	};
 
-	public function new() {
+	public function new( objectWidth : Float, objectHeight : Float ) {
 		super();
 		normal.set(0, 0, 1);
-		scale.set(1, 1);
+		scale.set(1/objectWidth, 1/objectHeight);
 	}
 
 }