Переглянути джерело

Add constructor params for Env

ShiroSmith 5 роки тому
батько
коміт
f6d52ffd08
1 змінених файлів з 4 додано та 4 видалено
  1. 4 4
      h3d/scene/pbr/Environment.hx

+ 4 - 4
h3d/scene/pbr/Environment.hx

@@ -200,12 +200,12 @@ class Environment  {
 		Source can be cube map already prepared or a 2D equirectangular map that
 		will be turned into a cube map.
 	*/
-	public function new( src : h3d.mat.Texture ) {
+	public function new( src : h3d.mat.Texture, ?diffSize = 64, ?specSize = 512, ?sampleBits = 12 ) {
 		this.source = src;
 		equiToCube();
-		diffSize = 64;
-		specSize = 512;
-		sampleBits = 12;
+		this.diffSize = diffSize;
+		this.specSize = specSize;
+		this.sampleBits = sampleBits;
 	}
 
 	function equiToCube() {