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);
 	}
 
 }