I used to be able to access and manipulate the ShaderPass material (e.g. changing uniforms)
I.e. I could access aShaderPass.material. In the new version of processing (5.6.0) I could access it using version 4.5.0.
The use case I have is that I need to change material uniforms at runtime when scroll position changes.
Hi,
the material accessor was replaced by the method getFullscreenMaterial in version 5. You can read more about this change in the release notes of 4.8.0 and 5.0.0.
So instead of doing
const uniforms = myShaderPass.material.uniforms;
you do
const uniforms = myShaderPass.getFullscreenMaterial().uniforms;
Thanks @vanruesc. I've also found that
const uniforms = myShaderPass.quad.material.uniforms;
Also works.
Please note that Pass.quad is a private field which means that it may change without warning in future releases.