0
\$\begingroup\$

I am Lerping the Near value of my camera, from 0 to 38, and it gives this result: change near clip plane effect

As you see, it gives a nice effect. But now I would like the effect to occur only for one specific layer. How can I do that?

\$\endgroup\$
  • \$\begingroup\$ You can't change the near plane value per layer. But if using the old non-scriptable render pipeline you could stack two cameras with different near plane values that each draw different layers. Or you could incorporate the cutting plane into the shader for the objects you want to cut this way. \$\endgroup\$ – DMGregory Oct 19 at 12:29
1
\$\begingroup\$

Playing with Near/Far clip values by layers would basically mean to render every object using a different camera. Which would probably be overkill. I think what you're looking for is a custom shader on specific objects or group of objects that would "cut" them in given depth.

Please look at this very cool tutorial on how to achieve such an effect.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.