Ver código fonte

materials fixes

ncannasse 7 anos atrás
pai
commit
f5ce631bc1
3 arquivos alterados com 6 adições e 6 exclusões
  1. 2 2
      h3d/mat/Material.hx
  2. 3 3
      h3d/mat/PbrMaterial.hx
  3. 1 1
      h3d/scene/pbr/Renderer.hx

+ 2 - 2
h3d/mat/Material.hx

@@ -297,8 +297,8 @@ class Material extends BaseMaterial {
 					</select>
 				</dd>
 				<dt>Shadows</dt><dd><input type="checkbox" field="shadows"/></dd>
-				<dt>Culled</dt><dd><input type="checkbox" field="culled"/></dd>
-				<dt>Lighted</dt><dd><input type="checkbox" field="lighted"/></dd>
+				<dt>Culling</dt><dd><input type="checkbox" field="culling"/></dd>
+				<dt>Light</dt><dd><input type="checkbox" field="light"/></dd>
 			</dl>
 		');
 	}

+ 3 - 3
h3d/mat/PbrMaterial.hx

@@ -27,7 +27,7 @@ class PbrMaterial extends Material {
 			mainPass.setBlendMode(b);
 			mainPass.depthWrite = b == None;
 		}
-		return b;
+		return this.blendMode = b;
 	}
 
 	override function getDefaultProps( ?type : String ) : Any {
@@ -132,7 +132,7 @@ class PbrMaterial extends Material {
 			<dl>
 				<dt>Kind</dt>
 				<dd>
-					<select field="kind">
+					<select field="mode">
 						<option value="PBR">PBR</option>
 						<option value="Albedo">Albedo</option>
 						<option value="Overlay">Overlay</option>
@@ -147,7 +147,7 @@ class PbrMaterial extends Material {
 					</select>
 				</dd>
 				<dt>Shadows</dt><dd><input type="checkbox" field="shadows"/></dd>
-				<dt>Culled</dt><dd><input type="checkbox" field="culled"/></dd>
+				<dt>Culled</dt><dd><input type="checkbox" field="culling"/></dd>
 				<dt>AlphaKill</dt><dd><input type="checkbox" field="alphaKill"/></dd>
 			</dl>
 		');

+ 1 - 1
h3d/scene/pbr/Renderer.hx

@@ -213,7 +213,7 @@ class Renderer extends h3d.scene.Renderer {
 			mode : Pbr,
 			env : null,
 			envPower : 1.,
-			exposure : 1.,
+			exposure : 0.,
 			sky : Hide,
 		};
 		return props;