Documentation ¶
Overview ¶
Package shader is a node-based shader system.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node interface { // Eval evalutes the node for a given surface point. Eval(inputs []Result, params Params) Result // EvalDerivative evaluates the node's partial derivatives for a given // surface point (e.g. for bump mapping). EvalDerivative(inputs []Result, params Params) Result // ViewDependent returns whether the shader value depends on wo and wi. ViewDependent() bool // Dependencies returns the nodes on which the output of this shader depends. Dependencies() []Node }
Nodes are elements of a node-based shading tree. A shader associates a color or scalar with a surface point.
type Result ¶
type Result [4]float64
func (Result) Color ¶
func (r Result) Color() color.AlphaColor
func (Result) Derivative ¶
Derivative calculates the (approximate) partial derivatives of df/dNU and df/dNV where f is the shader function, and NU/NV/N build the shading coordinate system.
Click to show internal directories.
Click to hide internal directories.