func (sc *ShaderContext) ReleaseShaderContext(sc2 *ShaderContext) {
	sc.task.ReleaseShaderContext(sc2)
}
ReleaseShaderContext returns a context to the pool.
package core
import (
	"github.com/jamiec7919/vermeer/colour"
	m "github.com/jamiec7919/vermeer/math"
	"github.com/jamiec7919/vermeer/math/ldseq"
)
type BSDF interface {
	Sample(r0, r1 float64) m.Vec3
	Eval(omegaO m.Vec3) colour.Spectrum
	PDF(omegaO m.Vec3) float64
}
type BSDFSample struct {
	D        m.Vec3
	Pdf      float64
	PdfLight float32
	Liu      colour.Spectrum
	Ld       m.Vec3
	Ldist    float32
}
type Fresnel interface {
	Kr(cosTheta float32) colour.RGB
}
type Shader interface {
	Eval(sc *ShaderContext)
	EvalEmission(sc *ShaderContext, omegaO m.Vec3) colour.RGB
}
type ShaderContext struct {
	X, Y                int32      
	Sx, Sy              float32    
	RayType             uint16     
	Level               uint8      
	I, Sample, NSamples int        
	Scramble            [2]uint64  
	Weight              float32    
	Lambda              float32    
	Time                float32
	Ro, Rd              m.Vec3          
	Rl                  float64         
	ElemID              uint32          
	Geom                Geom            
	Psc                 *ShaderContext  
	Shader              Shader
	Transform, InvTransform m.Matrix4
	Po, P, Poffset m.Vec3  
	N, Nf, Ng, Ngf, Ns m.Vec3   
	DdPdu, DdPdv       m.Vec3   
	Bu, Bv             float32  
	U, V               float32  
	DdPdx, DdPdy   m.Vec3  
	DdDdx, DdDdy   m.Vec3  
	DdNdx, DdNdy   m.Vec3  
	Dduvdx, Dduvdy m.Vec2  
	Lights   []Light  
	Lidx     int      
	Lsamples []LightSample
	Lp       Light  
	Area float32
	Image *Image  
	OutRGB      colour.RGB
	OutSpectrum colour.Spectrum
	task *RenderTask
	next *ShaderContext  
	priv *shaderPrivate
}
type shaderPrivate struct {
	next *shaderPrivate  
}
func (sc *ShaderContext) NewShaderContext() *ShaderContext {
	s := sc.task.NewShaderContext()
	s.Image = sc.Image
	return s
}