A raytracer that generates one (pretty) picture of some spheres
mrvacbob/atrace
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
master
Could not load branches
Nothing to show
Could not load tags
Nothing to show
{{ refName }}
default
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
-
Clone
Use Git or checkout with SVN using the web URL.
Work fast with our official CLI. Learn more.
- Open with GitHub Desktop
- Download ZIP
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
This is a raytracer I wrote once since I didn't think I knew enough math. I never actually got a chance to use any 3D matrices, so I still don't know them, but I think there were some neat parts in here. I don't like raytracing anymore, though; it's good for refraction but good antialiasing and textures are too hard. If I work on this again I'll ditch it completely and do forward raytracing for global illumination, then some kind of ordinary rendering with edge AA+good textures (or try to combine them in some way so it can still have camera effects). ======================================= Neat parts ======================================= * Better-than-bilinear texture interpolation * Attempts to be more correct than usual for image import/export - images are properly converted between sRGB and linear FP RGB using noise shaping. * Simulates unpolarized Fresnel equations * A backtracking hack for caustics without doing global illumination * SSSE3 accelerated vector class * A somewhat-successful nonlinear texture interpolation algorithm ======================================= Not-neat parts ======================================= * It's unreadable. Although I'd like to think it's better than the tutorials I read first. * No collision acceleration. It is pretty fast considering this+backtracking, though. * The texture interpolation has a fixed-sized support, so it'll look bad if textures are effectively downsized. * You can only do spheres and checkerboards. * No scene file format. ====================================== Short-term todo ====================================== * Fix top half of the image being black. * Adopt Cook-Torrance instead of Phong+Fresnel.
About
A raytracer that generates one (pretty) picture of some spheres
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published