Skip to content
Snippets Groups Projects
Commit 20ea13b1 authored by Alex Laptop's avatar Alex Laptop
Browse files

[#94] Fix ray generation, no more lens distortion

parent 33da7e00
No related branches found
No related tags found
1 merge request!77Resolve "SAF-R Module"
Pipeline #27214 passed
......@@ -240,7 +240,7 @@ vec3 computeDirection(ivec2 coord){
float x = ndc.x * tanFovHalf * aspectRatio;
float y = -ndc.y * tanFovHalf;
vec3 directionViewSpace = vec3(x, y, sqrt(1 - x*x - y*y));
vec3 directionViewSpace = normalize(vec3(x, y, 1));
vec3 directionWorldSpace = mat3(viewToWorld) * directionViewSpace;
return directionWorldSpace;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment