render: scene: Make material factors default to 1.0.
authorDavid Thompson <dthompson2@worcester.edu>
Fri, 7 Sep 2018 21:33:21 +0000 (17:33 -0400)
committerDavid Thompson <dthompson2@worcester.edu>
Fri, 7 Sep 2018 21:33:21 +0000 (17:33 -0400)
chickadee/render/asset.scm
chickadee/render/scene.scm

index 20034dd..28fee7d 100644 (file)
                (vector-ref textures (number-ref obj "index")))))
            (normal-factor
             (let ((v (or (array-ref/optional obj "normalFactor")
-                         #(0.0 0.0 0.0))))
+                         #(1.0 1.0 1.0))))
               (vec3 (vector-ref v 0) (vector-ref v 1) (vector-ref v 2))))
            (normal-texture
             (match (object-ref/optional obj "normalTexture")
               (obj (vector-ref textures (number-ref obj "index")))))
            (occlusion-factor
             (let ((v (or (array-ref/optional obj "occlusionFactor")
-                         #(0.0 0.0 0.0))))
+                         #(1.0 1.0 1.0))))
               (vec3 (vector-ref v 0) (vector-ref v 1) (vector-ref v 2))))
            (occlusion-texture
             (match (object-ref/optional obj "occlusionTexture")
               (obj (vector-ref textures (number-ref obj "index")))))
            (emissive-factor
             (let ((v (or (array-ref/optional obj "emissiveFactor")
-                         #(0.0 0.0 0.0))))
+                         #(1.0 1.0 1.0))))
               (vec3 (vector-ref v 0) (vector-ref v 1) (vector-ref v 2))))
            (emissive-texture
             (match (object-ref/optional obj "emissiveTexture")
index db8b2bf..818957e 100644 (file)
 
 (define* (make-material #:key
                         (name "anonymous")
-                        (base-color-factor #v(0.0 0.0 0.0))
+                        (base-color-factor #v(1.0 1.0 1.0))
                         (base-color-texture null-texture)
                         (metallic-factor 1.0)
                         (roughness-factor 1.0)
                         (metallic-roughness-texture null-texture)
-                        (normal-factor #v(0.0 0.0 0.0))
+                        (normal-factor #v(1.0 1.0 1.0))
                         (normal-texture null-texture)
-                        (occlusion-factor #v(0.0 0.0 0.0))
+                        (occlusion-factor #v(1.0 1.0 1.0))
                         (occlusion-texture null-texture)
-                        (emissive-factor #v(0.0 0.0 0.0))
+                        (emissive-factor #v(1.0 1.0 1.0))
                         (emissive-texture null-texture)
                         (alpha-mode 'opaque)
                         (alpha-cutoff 0.5)