Is it possible to create a transparent material, through which the colors are altered? I would like to create the windows of a house, from which everything you see through, can be of a single color, (example completely purple, or completely black and white, or completely red)
In this way everything will appear black and white. Not just what is through the window. quite right?
Best way is to use a post process volume. Put the volume around the window pane, so that when the player is near it they are in the PP volume.
I recommend using a setup like this one on your window material. Let me know if this is what you need, or you have more questions.
EDIT: I know, it doesn’t yet filter by colour, I can help with that too if you need, it just will be a bit more complex than showing the basic setup, so i don’t want to sink more time into this if you want to figure that out yourself
EDIT #2 unless I misunderstood, and you want something really simple like this:
Which also means you cant allow the player to look through the window unless they step into the pp volume.
Only when you’re inside the volume…
Ok #2 that’s what I’m trying to do. However it seems that it does not work for Android with open gl es 3.1. is there another way to do it?
The best I could come up with is using “Render CustomDepth Pass” on all objects in the scene. Assign a different CustomDepth Stencil Value to every differently coloured window, and another for all other objects, and filtering those stencils in a post process material. Then use translucent materials with at least 0.34 opacity for the windows. Also check “Allow Custom Depth Writes” on the translucent material.
Multiple colours for multiple windows would mean multiple if nodes. unless you have just 2 window colours. In that last case you could go with 0 for normal objects, 1 for first window colour, 2 for second window colour and plug in the instructions respectively.
EDIT: You probably also have to set “Custom Depth-Stencil Pass” to “Enabled with Stencil” in the Project Settings. (restart editor after this)