cornell_box

command
v0.2.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2021 License: BSD-2-Clause Imports: 6 Imported by: 0

README

cornell-box

This ray tracing example shows area lighting, reflection, refraction, and how to load existing 3D models (the diamond).

By default, it outputs a grainy low-resolution rendering (which takes about a minute):

Low-res rendering

Raising the quality and resolution is as simple as modifying these lines:

MaxDepth:   5,
NumSamples: 400,

and this line:

img := render3d.NewImage(200, 200)

Simply increase MaxDepth to maybe 15, increase NumSamples to 20000, and increase the resolution from 200x200 to whatever you want. Here's an example HD rendering at 500x500:

High-resolution rendering

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL