Explorar o código

Fixed Pbr lights in JS

Italo F. Capasso B %!s(int64=3) %!d(string=hai) anos
pai
achega
e09caca70f
Modificáronse 3 ficheiros con 3 adicións e 3 borrados
  1. 1 1
      h3d/scene/pbr/Light.hx
  2. 1 1
      h3d/scene/pbr/PointLight.hx
  3. 1 1
      h3d/scene/pbr/SpotLight.hx

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

@@ -7,7 +7,7 @@ class Light extends h3d.scene.Light {
 	public var power : Float = 1.;
 	public var shadows : h3d.pass.Shadows;
 	public var isMainLight = false;
-	public var occlusionFactor : Float;
+	public var occlusionFactor : Float = 0.;
 	public var enableForward : Bool = true;
 
 	function new(shader,?parent) {

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

@@ -3,7 +3,7 @@ package h3d.scene.pbr;
 class PointLight extends Light {
 
 	var pbr : h3d.shader.pbr.Light.PointLight;
-	public var size : Float;
+	public var size : Float = 0.;
 	public var zNear : Float = 0.02;
 	/**
 		Alias for uniform scale.

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

@@ -6,7 +6,7 @@ class SpotLight extends Light {
 
 	public var range(get,set) : Float;
 	public var angle(default,set) : Float;
-	public var fallOff : Float;
+	public var fallOff : Float = 0.;
 	public var cookie : h3d.mat.Texture;
 	var lightProj : h3d.Camera;