I am writing a shader to apply only on one layer of a picture:
uniform vec2 iResolution; // The resolution of current render output. It is usually a document size.
uniform float iNormalizedTime; // The normalized time of the current frame, from 0 to 1.
uniform int iFrame; // The current frame number.
uniform shader iImage; // The Background input of the node, alternatively you can use “Background” uniform.
uniform shader iNoise;
half4 main(float2 uv){
half4 color = iImage.eval(uv);half4 noise = iNoise.eval(uv);
return half4(color.rgb * noise.x * 2, color.a * step(0.5, noise.x));
}
Working with a custom output, I can see that the less opaque pixels are removed (the step function). However, in the full picture, no pixel from the effect layer are removed, but still the effect is only applied to the shape drawn in this specific layer. Do somebody knows what is happening?


