hey, thanks for the awesome library. one question -- is there a way to update the uniforms of my custom effects realtime without recompiling the shader?
<script type="script-effect" id="customBlend" data-diffuse data-defaults="0.1">
void $main(inout vec4 c, vec4 o, vec2 uv, float d){
c.rgb = o.rgb;
c.r = pow(c.r,$0);
}
</script>
for example, in this code, I want to change the value of $0 from another component in the scene. I can do so by setting this.el.sceneEl.setAttribute('effects', [newEffectString])
but this causes the shader to recompile.
hey, thanks for the awesome library. one question -- is there a way to update the uniforms of my custom effects realtime without recompiling the shader?
for example, in this code, I want to change the value of
$0from another component in the scene. I can do so by settingthis.el.sceneEl.setAttribute('effects', [newEffectString])but this causes the shader to recompile.