Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Ray Camera::castRay(vec2 pos, float ratio) {
- float tfov = dtan(fov / 2.f);
- vec3 dir = (xaxis * tfov * ratio * pos.x + yaxis * tfov * pos.y + zaxis).normalize();
- return Ray(position, dir);
- }
Advertisement
Add Comment
Please, Sign In to add comment