I have 2 post-process materials in which I’d like to use the CustomDepth Stencil values to toggle a secondary effect in the materials.
In the first one:
- 1st bit: Do nothing if 0, have a purple outline if set to 1.
- 2nd bit: If set to 1, ignore the 1st bit and have a red outline.
- 3rd bit: If set to 1, ignore the 1st and 2nd bits and have a green outline.
In the second one:
- 4th bit: Multiply with purple if set to 0, add an orange color if set to 1.
In both of them:
- 8th bit: Ignore the post process material (simply have PostProcessInput0 as emissive color)
My intention is to have, say, a StaticMesh with a Stencil value of 5 (0101) that when switching between post process materials, it is shown to have a purple outline in one and have an orange-ish color in the other.
I tried using a bitmask for this, but it only renders the effect if it only has its corresponding bit set to 1, which is not what I’d like to have.