diff options
author | David Thompson <dthompson2@worcester.edu> | 2018-09-07 17:34:07 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2018-09-07 17:34:07 -0400 |
commit | 5da38baa24b69888fddd71adf79b9984e60e0cef (patch) | |
tree | 0d7d155fd50bcdbabb71b8484db2e8def56976f8 | |
parent | 75b1696c7a97d430db597e8520e4449a6a186c3e (diff) |
render: asset: Use default sampler index of 0 when loading textures.
-rw-r--r-- | chickadee/render/asset.scm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/chickadee/render/asset.scm b/chickadee/render/asset.scm index 5e4362c..91bdee2 100644 --- a/chickadee/render/asset.scm +++ b/chickadee/render/asset.scm @@ -259,7 +259,8 @@ (33071 'clamp-to-edge))) (define (parse-texture obj images samplers) (let ((image (vector-ref images (number-ref obj "source"))) - (sampler (vector-ref samplers (number-ref obj "sampler")))) + (sampler + (vector-ref samplers (or (number-ref/optional obj "sampler") 0)))) (load-image (scope-file (string-ref image "uri")) #:min-filter (texture-filter (number-ref/optional sampler "minFilter")) |