summaryrefslogtreecommitdiff
path: root/chickadee/graphics/pbr.scm
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2021-08-12 20:25:25 -0400
committerDavid Thompson <dthompson2@worcester.edu>2021-08-12 20:25:25 -0400
commit8925bd867e1a8791801698b1abaec4a46180656e (patch)
tree9a7a31445e86952a85b185969bfde2780cfdc5d0 /chickadee/graphics/pbr.scm
parentf82e5122c2feabb8d92e3d4d1789ee1490b96a90 (diff)
graphics: Always use normal/ambient/etc. maps.
If models don't specify their own textures, use noop textures as appropriate.
Diffstat (limited to 'chickadee/graphics/pbr.scm')
-rw-r--r--chickadee/graphics/pbr.scm38
1 files changed, 10 insertions, 28 deletions
diff --git a/chickadee/graphics/pbr.scm b/chickadee/graphics/pbr.scm
index 16b5878..e1641ec 100644
--- a/chickadee/graphics/pbr.scm
+++ b/chickadee/graphics/pbr.scm
@@ -35,19 +35,13 @@
#:export (make-pbr-properties
pbr-properties?
pbr-properties-base-color-factor
- pbr-properties-base-color-texture-enabled?
pbr-properties-base-color-texcoord
pbr-properties-metallic-factor
pbr-properties-roughness-factor
- pbr-properties-metallic-roughness-texture-enabled?
pbr-properties-metallic-roughness-texcoord
- pbr-properties-normal-factor
- pbr-properties-normal-texture-enabled?
pbr-properties-normal-texcoord
- pbr-properties-occlusion-texture-enabled?
pbr-properties-occlusion-texcoord
pbr-properties-emissive-factor
- pbr-properties-emissive-texture-enabled?
pbr-properties-emissive-texcoord
pbr-properties-alpha-mode
pbr-properties-alpha-cutoff
@@ -58,41 +52,29 @@
make-pbr-properties
pbr-properties?
(float-vec3 base-color-factor pbr-properties-base-color-factor)
- (bool base-color-texture-enabled pbr-properties-base-color-texture-enabled?)
(int base-color-texcoord pbr-properties-base-color-texcoord)
(float metallic-factor pbr-properties-metallic-factor)
(float roughness-factor pbr-properties-roughness-factor)
- (bool metallic-roughness-texture-enabled pbr-properties-metallic-roughness-texture-enabled?)
(int metallic-roughness-texcoord pbr-properties-metallic-roughness-texcoord)
- (float-vec3 normal-factor pbr-properties-normal-factor)
- (bool normal-texture-enabled pbr-properties-normal-texture-enabled)
(int normal-texcoord pbr-properties-normal-texcoord)
- (bool occlusion-texture-enabled pbr-properties-occlusion-texture-enabled)
(int occlusion-texcoord pbr-properties-occlusion-texcoord)
(float-vec3 emissive-factor pbr-properties-emissive-factor)
- (bool emissive-texture-enabled pbr-properties-emissive-texture-enabled)
(int emissive-texcoord pbr-properties-emissive-texcoord)
(int alpha-mode pbr-properties-alpha-mode)
(float alpha-cutoff pbr-properties-alpha-cutoff))
(define default-pbr-properties
(make-pbr-properties #:base-color-factor #v(1.0 1.0 1.0)
- #:base-color-texture-enabled #f
- #:base-color-texcoord 0
- #:metallic-factor 1.0
- #:roughness-factor 1.0
- #:metallic-roughness-texture-enabled #f
- #:metallic-roughness-texcoord 0
- #:normal-factor #v(1.0 1.0 1.0)
- #:normal-texture-enabled #f
- #:normal-texcoord 0
- #:occlusion-texture-enabled #f
- #:occlusion-texcoord 0
- #:emissive-factor #v(1.0 1.0 1.0)
- #:emissive-texture-enabled #f
- #:emissive-texcoord 0
- #:alpha-mode 0
- #:alpha-cutoff 0.5))
+ #:base-color-texcoord 0
+ #:metallic-factor 1.0
+ #:roughness-factor 1.0
+ #:metallic-roughness-texcoord 0
+ #:normal-texcoord 0
+ #:occlusion-texcoord 0
+ #:emissive-factor #v(1.0 1.0 1.0)
+ #:emissive-texcoord 0
+ #:alpha-mode 0
+ #:alpha-cutoff 0.5))
(define %pbr-shader
(delay (load-shader (scope-datadir "shaders/pbr-vert.glsl")