         imageStore(renderTarget, currentTexel, prevResult);
         return;
     }
-#endif
+#endif // REPROJECTION_METHOD
+#endif // TEMPORAL_REPROJECTION
 
 	ray_t eye_ray;
     eye_ray.origin = uboPerFrame.ws_eyePosition;
-	eye_ray.direction = getViewDirection(uv);
+	eye_ray.direction = viewDir;
 
     // Raymarching is broken if eye is too close to the interface of cloud layers
     if (abs(eye_ray.origin.y - getCloudLayerMin()) <= 1.5 || abs(eye_ray.origin.y - getCloudLayerMax()) <= 1.5) {

    return ray_forward;
}
vec2 viewDirectionToUV_prevFrame(vec3 dir) {
    float zOnPlane = -(1.0 / tan(uboPerFrame.zRange.z * 0.5));

    vec3 P = mat3(uboPerFrame.prevViewTransform) * dir;
    P.xy *= zOnPlane / P.z;
    P.x *= uboPerFrame.screenResolution.y / uboPerFrame.screenResolution.x;
    return 0.5 * (P.xy + vec2(1.0));
}

void main() {

	in sphere_t sphere,
	inout hit_t hit
){
// Original code from shadertoy
#if 1
	vec3 rc = sphere.origin - ray.origin;
	float radius2 = sphere.radius * sphere.radius;
	float tca = dot(rc, ray.direction);
