Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PathTracingShader ¶
type PathTracingShader struct {
MaxDepth int
}
PathTracingShader is the full raytracing shader
type RenderConfig ¶
RenderConfig is input to the ray tracer for how the image should be rendered
type RenderProgress ¶
RenderProgress is progress reported back to the caller of the raytrace function
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
Renderer is a central part of the raytracer responsible for controlling the process reporting back progress to the caller
func NewRenderer ¶
func NewRenderer(scene *Scene, output chan RenderProgress, abort chan bool) *Renderer
NewRenderer creates a new renderer given a scene and channels for communicating with the caller
type Scene ¶
type Scene struct { World hittable.Hittable Cam camera.Camera BackgroundColor geo.Vec3 RenderConfig RenderConfig }
Scene contains all information needed to render an image
type Shader ¶
type Shader interface {
Shade(renderer *Renderer, rec *material.HitRecord, ray geo.Ray, depth int) geo.Vec3
}
Shader calculates the color from a ray hitting a hittable object
Click to show internal directories.
Click to hide internal directories.