How to apply a shader to a Panel

Started by Daryl Winters · one year ago · 1 reply · 277 views

#1
Daryl Winters
Member
JoinedMay 2021 Posts38 Score2,065
Hey,

I'm reworking on my previous jam entry and basically rewritting the junk jam code into something decent and up to date with the new api.


In order to do a "Camera surveillance" system like this
I'm rendering a Camera on a texture, build a razor world panel with it then add other UI elements.



Previously:

In order to do it in my jam entry I did a razor component that had a custom SceneCamera filled with a CameraComponent info (via UpdateSceneCamere() ). 

I created a render texture via Texture.CreateRenderTarget
Then rendered my scenecamera via Graphics.RenderToTexture(_sceneCamera, _texture);
And all my postprocesses component attached on my Camera gameobject where also rendered

Now:
I'm using directly the CameraComponent.RenderToTexture() without the SceneCamera bullshit intermediary
But the PostProcess components are not taken into accounts :/


So I've some questions:

- How can I make PostProcess work on rendered texture?
- Is it possible to apply a custom shader on World panels? (so the ui is also affeced by the 'post process')





#2
Daryl Winters
Member
JoinedMay 2021 Posts38 Score2,065
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.