Need help with c++

Who can help me recreate this Shader - Shadertoy BETA in the Unreal Engine 4 (Only fog part)

This belongs in the material section.

As for recreating it, you can do it step-by-step using material nodes. A couple of OpenGL functions like mix() should be replaced with Lerp (and fract() with Frac) but otherwise it’s pretty straightforward.

i cant recreate this

vec2 uv = (fragCoord - iResolution.xy * 0.5) / iResolution.y; //Screen

vec3 from = vec3(0, 0, -5.0); //CameraPosition
vec3 dir = normalize(vec3(uv*0.5, 1.0)); //RayDirection

how to make this working in ue4?