create this line at the begin of the shader, so you get error messages with line numbers. (without quotation marks) "#line 2" undefine variables: define it. par example iResolution and iMouse. vec3 iResolution = iWorldScale.xyz; vec2 iMouse = vec2(0); or vec3 iMouse = vec3(0); create the function getSkyboxColor() and call mainImage(): vec3 getSkyboxColor() { vec3 rayDirection = normalize(_normal); vec2 position = rayDirection.xy; position += 0.5; position.y = 1.0 - position.y; //position.y = 0 + position.y; //180° turn vec4 result; mainImage(result, position * iWorldScale.xy); return result.xyz; }