materials

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Reflectance

func Reflectance(cosine, refIdx float64) float64

Reflectance uses Schlick's approximation for reflectance.

Types

type Barycentric

type Barycentric struct{}

barycentric

func NewBarycentric

func NewBarycentric() Barycentric

func (Barycentric) Emitted

func (Barycentric) Scatter

func (l Barycentric) Scatter(in geometry.Ray, rec *rendering.HitRecord, attenuation *vector3.Float64, scattered *geometry.Ray) bool

type Dielectric

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

func NewDielectric

func NewDielectric(indexOfRefraction float64) Dielectric

func NewDielectricWithColor added in v0.4.0

func NewDielectricWithColor(indexOfRefraction float64, color vector3.Float64) Dielectric

func (Dielectric) Emitted

func (d Dielectric) Emitted(uv vector2.Float64, pont vector3.Float64) vector3.Float64

func (Dielectric) Scatter

func (d Dielectric) Scatter(in geometry.Ray, rec *rendering.HitRecord, attenuation *vector3.Float64, scattered *geometry.Ray) bool

type DiffuseLight

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

func NewDiffuseLight

func NewDiffuseLight(tex rendering.Texture) DiffuseLight

func NewDiffuseLightWithColor

func NewDiffuseLightWithColor(color vector3.Float64) DiffuseLight

func (DiffuseLight) Emitted

func (dl DiffuseLight) Emitted(uv vector2.Float64, point vector3.Float64) vector3.Float64

func (DiffuseLight) Scatter

func (dl DiffuseLight) Scatter(in geometry.Ray, rec *rendering.HitRecord, attenuation *vector3.Float64, scattered *geometry.Ray) bool

type Lambertian

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

func NewLambertian

func NewLambertian(tex rendering.Texture) *Lambertian

func (Lambertian) Emitted

func (l Lambertian) Emitted(uv vector2.Float64, pont vector3.Float64) vector3.Float64

func (Lambertian) Scatter

func (l Lambertian) Scatter(in geometry.Ray, rec *rendering.HitRecord, attenuation *vector3.Float64, scattered *geometry.Ray) bool

type Metal

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

func NewFuzzyMetal

func NewFuzzyMetal(color vector3.Float64, fuzz float64) Metal

func NewMetal

func NewMetal(color vector3.Float64) Metal

func (Metal) Emitted

func (m Metal) Emitted(uv vector2.Float64, pont vector3.Float64) vector3.Float64

func (Metal) Scatter

func (m Metal) Scatter(in geometry.Ray, rec *rendering.HitRecord, attenuation *vector3.Float64, scattered *geometry.Ray) bool

Jump to

Keyboard shortcuts

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