RenderFilter¶
Overview¶
RenderProgram for applying a color-matrix filter
NOTE: This operates on unpremultiplied colors. Presumably for most operations, you'll want to wrap it in the corresponding conversions.
@author Jonathan Olson <jonathan.olson@colorado.edu>
Class RenderFilter¶
Constructor¶
new RenderFilter( program : RenderProgram, colorMatrix : Matrix4, colorTranslation : Vector4, logic? : RenderFilterLogic )¶
Instance Methods¶
getName() : string¶
withChildren( children : RenderProgram[] ) : RenderFilter¶
equalsTyped( other : this ) : boolean¶
(protected)
getSimplified( children : RenderProgram[] ) : RenderProgram | null¶
(protected)
evaluate( context : RenderEvaluationContext ) : Vector4¶
writeInstructions( instructions : RenderInstruction[] )¶
serialize() : SerializedRenderFilter¶
Instance Properties¶
logic : RenderFilterLogic¶
(readonly)
Static Methods¶
applyFilter( color : Vector4, colorMatrix : Matrix4, colorTranslation : Vector4 ) : Vector4¶
deserialize( obj : SerializedRenderFilter ) : RenderFilter¶
Class RenderFilterLogic¶
Constructor¶
new RenderFilterLogic( colorMatrix : Matrix4, colorTranslation : Vector4 )¶
Instance Methods¶
equals( other : RenderFilterLogic ) : boolean¶
Class RenderInstructionFilter¶
Constructor¶
new RenderInstructionFilter( logic : RenderFilterLogic )¶
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 ) : RenderInstructionFilter¶
Type SerializedRenderFilter¶
- type: "RenderFilter"
- program: SerializedRenderProgram
- colorMatrix: number[]
- colorTranslation: number[]
Source Code¶
See the source for RenderFilter.ts in the alpenglow repository.