What can replace gl_FragCoord ?


I am trying to convert glsl shader to hlsl from the shadertoy.com

Shader template from there looks like this, but I do not know what can replace fragCoord in Unreal Engine ?

I use node custom in material. Thanks!

void mainImage( out vec4 fragColor, in vec2 fragCoord )
	vec2 uv = fragCoord.xy / iResolution.xy;
	fragColor = vec4(uv,0.5+0.5*sin(iGlobalTime),1.0);

uv = ScreenPosition

fragCoord = ScreenPosition * ScreenResolution

1 Like