I did Peter Shirley's "Ray Tracing in One Weekend" tutorial, and this repo contains the results.
Here's my final render, which used 500 rays per pixel and a max ray depth of 50 bounces, and took 16 minutes to run across 12 theads on an i7-8700K:
I love Go's built-in code formatting (gofmt), and I was excited to see that Visual Studio supports per-project C/C++ code formatting via the open .clang-format. I've added a .clang-format to this project that I've customized into something that I find fairly readable.
Unfortunately, VS ships with an older version of clang-format.exe, and I've made use of newer features that cause the older formatter to fail. Luckily, VS is literally calling a copy of clang-format.exe, and that exe can be swapped for a newer build. Here's how I did it:
- Download the latest LLVM snapshot build for Windows
- Extract the contents of the downloaded installer (you do not need to run the installer to do this)
- If you have 7-Zip installed with the shell extension
- Right-click
LLVM-<version>-win64.exe
- Choose the
7-Zip
context menu, thenExtract to "LLVM-<version>-win64\"
- Right-click
- Find where Visual Studio has installed
clang-format.exe
- For me, it was in
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\Llvm\8.0.0\bin\
- For me, it was in
- rename original
clang-format.exe
toclang-format.exe.original
- copy the downloaded
clang-format.exe
into this folder
- If you have 7-Zip installed with the shell extension
type | style |
---|---|
class names | CapitalCamelCase |
class member names | lower_case_trailing_underscore_ |
file names | lower_case.ext |
function names | lower_case_underscores |
struct names | lower_case_underscores |
variable names | lower_case_underscores |