summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chickadee/render/asset.scm3
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"))