rend

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2021 License: GPL-3.0 Imports: 16 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(r *Renderer)

func WithBackground

func WithBackground(c color.RGBA) Option

func WithConcurrency

func WithConcurrency(n int32) Option

func WithDebug

func WithDebug(enable bool) Option

func WithGammaCorrection

func WithGammaCorrection(enable bool) Option

func WithMSAA

func WithMSAA(n int) Option

func WithScene

func WithScene(s *scene.Scene) Option

func WithShadowMap

func WithShadowMap(enable bool) Option

func WithSize

func WithSize(width, height int) Option

func WithThreadLimit

func WithThreadLimit(n int) Option

type Renderer

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

Renderer is a hybrid software renderer that implements rasterization and ray tracing.

func NewRenderer

func NewRenderer(opts ...Option) *Renderer

NewRenderer creates a new renderer.

The renderer implements a rasterization rendering pipeline.

func (*Renderer) Render

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

Render renders a scene.

func (*Renderer) UpdateOptions

func (r *Renderer) UpdateOptions(opts ...Option)

type ShadowMap

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

func NewShadowMap

func NewShadowMap(opts ...ShadowMapOption) *ShadowMap

func (*ShadowMap) Bias

func (sm *ShadowMap) Bias() float64

func (*ShadowMap) Camera

func (sm *ShadowMap) Camera() camera.Interface

type ShadowMapOption

type ShadowMapOption func(sm *ShadowMap)

func WithShadowMapBias

func WithShadowMapBias(bias float64) ShadowMapOption

func WithShadowMapCamera

func WithShadowMapCamera(c camera.Interface) ShadowMapOption

func WithShadowMapType

func WithShadowMapType(typ ShadowType) ShadowMapOption

type ShadowType

type ShadowType int
const (
	ShadowTypeHard ShadowType = iota // hard shadow mapping
	ShadowTypePCF                    // percentage closer filtering
	ShadowTypePCSS                   // percentage closer soft shadows
	ShadowTypeVSSM                   // variance soft shadow mapping
	ShadowTypeMSM                    // moment shadow mapping
)

Jump to

Keyboard shortcuts

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