#Trying to make thermal shader without 2 cameras

8 messages · Page 1 of 1 (latest)

twilit fulcrum
#

Ive interated trough multiple ways, currently i am trying to make a shader and to do it trough shader i would need to have a shader interacting with the other or getting the screen space position of the texture being rendered which idk if it is possible.
Like, if the object is within x,y cord of the screen than render that part of the object with the shader being applied and the rest normally

Are there other ways to do this

The shader needs to be picture on picture

#

Trying to make thermal shader without 2 cameras

fathom ginkgo
# twilit fulcrum Ive interated trough multiple ways, currently i am trying to make a shader and t...

your objects could have a shader with different passes that do stencil mask checks, and depending on which check passes, will either run the one or other, with the one rendering it normally and the other rendering it thermally,
but that would need a special shader on all your objects
and then when you have the thermal vision that's just some object in front of the camera that writes the the stencil buffer but maybe not to the depth buffer or and has a 0 colormask

#

or even skip the stencil and maybe you can just calculate the screen coordinate in the object's shader directly

#

then you could set a global shader variable that you check for whether the mode is active or not

#

where you set the last one through script

twilit fulcrum
#

thank you, i got it to work @fathom ginkgo