tunalan Posted March 2, 2018 Share Posted March 2, 2018 Hi everyone, I am looking for a way to create a custom ZDepth pass where I can define my closest and farthest values, possibly try to keep them between 0 and 1. The reason the Z pass is not working out of the box for me is because I believe the scene scale is too small where my values are going to insane values or "inf". I created a shader with vector Shading Point in World-Space and it seems like it could be right approach but I haven't exactly figured out a way to get exactly what I need. Any thoughts on how to achieve this custom pass/shader? Thank you! Quote Link to comment Share on other sites More sharing options...
Skybar Posted March 2, 2018 Share Posted March 2, 2018 In your shader you can just grab 'P' (which is already in camera space because we are in a shader), take the Z component and fit it between what you want. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.