Skip to content

Commit aa6410c

Browse files
committed
minor
1 parent 8cad418 commit aa6410c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

jupylet/shadertoy.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,9 @@ def render(self, ct, dt):
194194
if ch is None:
195195
continue
196196

197-
self.shader['iChannel%s' % i] = SPRITE_TEXTURE_UNIT + i
198-
ch.use(location=SPRITE_TEXTURE_UNIT+i)
197+
if 'iChannel%s' % i in self.shader._members:
198+
self.shader['iChannel%s' % i] = SPRITE_TEXTURE_UNIT + i
199+
ch.use(location=SPRITE_TEXTURE_UNIT+i)
199200

200201
if 'iChannelTime[%s]' % i in self.shader._members:
201202
self.shader['iChannelTime[%s]' % i] = self.channeltime[i]

0 commit comments

Comments
 (0)