- Home /
Is there a way to orthographic a specific mesh from the perspective camera with a shader?
hi
I'm looking for a way to orthographically represent only certain objects in a perspective camera. I know I need to convert it to a vertex shader, but I can't try it because I don't have an idea of how to convert it.
I'd be grateful if you could share any related ideas with me.
Thanks for reading.
Answer by The-Peaceful · Apr 16, 2021 at 07:45 AM
Hi, I am not too good with shaders but another way to do it would be: You could use two cameras, one perspective and as a culling mask only those layers you want to be rendered in perspective view and the other one orthographic with a culling mask for only the layers you want to be drawn in orthographic view. You can then use the orthographic camera as a overlay camera for the main camera (perspective camera). But you'd need the URP (at least version 7.2.1) for that, else you can't stack cameras on top of each other.
Here's a little package with a scene in which I did the thing I explained above. Package
Hope it helps!
Your answer
Follow this Question
Related Questions
Vertical Perspective / Horizontal Orthographic 1 Answer
Can I make a camera that has an orthographic vertical axis, but a perspective on the horzontal axis? 1 Answer
Drawing on the same screen with different cameras? 1 Answer
Rendering a 3D object within a specific area/bound? 1 Answer
Stairs in 2D 1 Answer