This repository has been archived by the owner on Oct 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e95e18c
commit 0c9add5
Showing
7 changed files
with
39 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# jtracer | ||
|
||
**jtracer** is a C++ raytracer capable of running either on the CPU (multithreaded or non-multithreaded) or as an Apple Metal compute kernel. | ||
|
||
The raytracer was originally based on the implementation guide given by Peter Shirley's excellent ebook [Ray Tracing In One Weekend](https://www.amazon.com/Ray-Tracing-Weekend-Minibooks-Book-ebook/). The algorithms were modified to make the raytracer non-allocating (i.e. non stack based) by using color/light accumulators with a single ray object to trace through the scene. | ||
|
||
The implementation found in [`jtracer/Trace`](jtracer/Trace) is designed to be extremely portable. It is a header-only implementation of a general GPU-compute compatible raytracer from a per-pixel standpoint given a set of scene parameters (in this case, a bunch of spheres). In theory, it should work in an OpenCL C++ or CUDA environment with little modification - likely just some system-specific definitions in [`JTTypes.h`](jtracer/Trace/JTTypes.h). | ||
|
||
The frontend is written in Objective-C++. It is tested with Xcode 9.3 under macOS 10.13.4. The UI is extremely simple - all options are hardcoded within the app. On startup the main window will display two views: the top is a GPU-compute render via Metal, and the bottom is a multicore CPU render scheduled by `libdispatch` (Grand Central Dispatch). Below is a screenshot: | ||
|
||
<img src="https://github.com/jonathonracz/jtracer/blob/master/screenshot.png?raw=true" alt="Screenshot, as described above."> |
8 changes: 8 additions & 0 deletions
8
jtracer.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>IDEDidComputeMac32BitWarning</key> | ||
<true/> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ class Path | |
{ | ||
} | ||
|
||
float3 trace(JT_THREAD Ray ray) | ||
float3 trace(Ray ray) | ||
{ | ||
Sphere::HitRecord hitRecord; | ||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.