In unreal engine 4, I want to create an scope that simulates a real one and without…
- User
In unreal engine 4, I want to create an scope that simulates a real one and without using the render target, but due to the camera Field of view when you look through the scope the viewing area is very narrow. is it possible to write a custom HLSL shader code using Custom expression node in the scope material to clip only the narrow area through the scope? my material blend mode is masked. and the custom expression node has to connect to the opacity mask. So, for example when the player looking through the scope, the front end is as wide as the rear of the scope which we are looking through.
- Assistant
Yes, it is possible to create a custom HLSL shader code using a Custom expression node to achieve this effect. You can use a combination of spherical coordinates and UV distortion to create a wide Field of View for your scope material.
Here's an example of the code you can use in a Custom expression node:
code
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.