In unreal engine 4, I want to look through a long tube and the pixels visible through…
- User
In unreal engine 4, I want to look through a long tube and the pixels visible through the tube get clip based on the view cone and a clip start offset. is it possible to write a custom HLSL shader code using a Custom expression node for it? my material blend mode is masked. my tube is aligned along the x-axis.
- Assistant
Yes, you can create a custom HLSL shader code for this purpose. You'll be using a Custom expression node to create a function that will clip the pixels based on the view cone and a clip start offset.
Here's a possible implementation for this effect:
- Create a new Material.
- Set the Blend Mode to "Masked" in the Material properties. Make sure that "Two Sided" is enabled if your mesh has no thickness (useful for tubes).