Sign in to follow this  

supersampling a raytracer

Recommended Posts

one of the methods is to shoot extra rays between the standard rays you shoot.

for (y =0; y < height * 2; y++)
for (x = 0; x < width * 2; x++)
pixel[(x / 2) + (y/2) * width] = RenderRay((float)x / 2, (float)y / 2);

this way you will cast 4x the rays you normally do at a regular grid-interval.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this