RenderBarycentricPerspectiveBlend¶
Overview¶
RenderProgram for a triangular barycentric blend. Applies perspective correction.
@author Jonathan Olson <jonathan.olson@colorado.edu>
Class RenderBarycentricPerspectiveBlend¶
Constructor¶
new RenderBarycentricPerspectiveBlend( pointA : Vector3, pointB : Vector3, pointC : Vector3, accuracy : RenderBarycentricPerspectiveBlendAccuracy, a : RenderProgram, b : RenderProgram, c : RenderProgram, logic? : RenderBarycentricPerspectiveBlendLogic )¶
Instance Methods¶
getName() : string¶
withChildren( children : RenderProgram[] ) : RenderBarycentricPerspectiveBlend¶
transformed( transform : Matrix3 ) : RenderProgram¶
equalsTyped( other : this ) : boolean¶
(protected)
getSimplified( children : RenderProgram[] ) : RenderProgram | null¶
(protected)
TODO: extract code for the barycentric blends? duplicated
evaluate( context : RenderEvaluationContext ) : Vector4¶
writeInstructions( instructions : RenderInstruction[] )¶
serialize() : SerializedRenderBarycentricPerspectiveBlend¶
Instance Properties¶
logic : RenderBarycentricPerspectiveBlendLogic¶
(readonly)
Static Methods¶
deserialize( obj : SerializedRenderBarycentricPerspectiveBlend ) : RenderBarycentricPerspectiveBlend¶
Class RenderBarycentricPerspectiveBlendLogic¶
Constructor¶
new RenderBarycentricPerspectiveBlendLogic( det : number, diffA : Vector2, diffB : Vector2, point2C : Vector2, zInverseA : number, zInverseB : number, zInverseC : number, accuracy : RenderBarycentricPerspectiveBlendAccuracy )¶
Instance Methods¶
equals( other : RenderBarycentricPerspectiveBlendLogic ) : boolean¶
apply( output : Vector4, context : RenderEvaluationContext, aColor : Vector4, bColor : Vector4, cColor : Vector4 )¶
Static Methods¶
from( pointA : Vector3, pointB : Vector3, pointC : Vector3, accuracy : RenderBarycentricPerspectiveBlendAccuracy ) : RenderBarycentricPerspectiveBlendLogic¶
Class RenderInstructionBarycentricPerspectiveBlend¶
Constructor¶
new RenderInstructionBarycentricPerspectiveBlend( logic : RenderBarycentricPerspectiveBlendLogic )¶
Instance Methods¶
toString() : string¶
equals( other : RenderInstruction, areLocationsEqual : ( a: RenderInstructionLocation, b: RenderInstructionLocation ) => boolean ) : boolean¶
execute( stack : RenderExecutionStack, context : RenderEvaluationContext, executor : RenderExecutor )¶
writeBinary( encoder : ByteEncoder, getOffset : ( location: RenderInstructionLocation ) => number )¶
getBinaryLength() : number¶
Static Methods¶
fromBinary( encoder : ByteEncoder, offset : number, getLocation : ( offset: number ) => RenderInstructionLocation ) : RenderInstructionBarycentricPerspectiveBlend¶
Type SerializedRenderBarycentricPerspectiveBlend¶
- type: "RenderBarycentricPerspectiveBlend"
- pointA: number[]
- pointB: number[]
- pointC: number[]
- accuracy: RenderBarycentricPerspectiveBlendAccuracy
- a: SerializedRenderProgram
- b: SerializedRenderProgram
- c: SerializedRenderProgram
Source Code¶
See the source for RenderBarycentricPerspectiveBlend.ts in the alpenglow repository.