render

package
v0.0.0-...-cc5a67f Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: CC0-1.0 Imports: 15 Imported by: 0

Documentation

Overview

Package render implements the main rendering loop.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Renderer

type Renderer struct {
	// contains filtered or unexported fields
}

Renderer represents a renderer config.

func New

func New(scene *scene.Scene, sizeX int, sizeY int, numSamples int, maxDepth int, background *vec3.Vec3Impl, ink *vec3.Vec3Impl,
	numWorkers int, verbose bool, previewChan chan display.DisplayTile, preview bool, samplerType sampler.SamplerType) *Renderer

New returns a new instance of a renderer.

func (*Renderer) Render

func (r *Renderer) Render() image.Image

Render performs the rendering task spread across 1 or more worker goroutines. It returns a FloatNRGBA image that can be further processed before output or fed to an output directly.

Jump to

Keyboard shortcuts

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