I need to update shader variables in real time, but if I try the following I get a black screen:
material.uniforms.enable = 0.0; //<<<<<<<
var material = new THREE.ShaderMaterial( {
uniforms: {
tL: { value: Ltexture.texture },
wres: { value: 1.0/w},
hres: { value: 1.0/h},
enable: { value: 1.0}
},
vertexShader: vshader,
fragmentShader: ttscreen
} );