Skip to content

RenderBlendCompose

Overview

RenderProgram for binary color-blending and Porter-Duff composition.

@author Jonathan Olson <jonathan.olson@colorado.edu>

Class RenderBlendCompose

import { RenderBlendCompose } from 'scenerystack/alpenglow';

Constructor

new RenderBlendCompose( composeType : RenderComposeType, blendType : RenderBlendType, a : RenderProgram, b : RenderProgram, logic? : RenderBlendComposeLogic )

Instance Methods

getName() : string

withChildren( children : RenderProgram[] ) : RenderBlendCompose

equalsTyped( other : this ) : boolean

(protected)

getSimplified( children : RenderProgram[] ) : RenderProgram | null

(protected)

evaluate( context : RenderEvaluationContext ) : Vector4

writeInstructions( instructions : RenderInstruction[] )

getExtraDebugString() : string

(protected)

serialize() : SerializedRenderBlendCompose

Instance Properties

logic : RenderBlendComposeLogic

(readonly)

Static Methods

blendCompose( a : Vector4, b : Vector4, composeType : RenderComposeType, blendType : RenderBlendType ) : Vector4

screen( cb : Vector3, cs : Vector3 ) : Vector3

colorDodge( cb : number, cs : number ) : number

colorBurn( cb : number, cs : number ) : number

hardLight( cb : Vector3, cs : Vector3 ) : Vector3

TODO: check examples, tests

softLight( cb : Vector3, cs : Vector3 ) : Vector3

TODO: check examples, tests

sat( c : Vector3 ) : number

TODO: check examples, tests

lum( c : Vector3 ) : number

TODO: check examples, tests

clipColor( c : Vector3 ) : Vector3

TODO: check examples, tests

setLum( c : Vector3, l : number ) : Vector3

setSatInner( c : Vector3, s : number )

setSat( c : Vector3, s : number ) : Vector3

deserialize( obj : SerializedRenderBlendCompose ) : RenderBlendCompose

Class RenderBlendComposeLogic

import { RenderBlendComposeLogic } from 'scenerystack/alpenglow';

Constructor

new RenderBlendComposeLogic( composeType : RenderComposeType, blendType : RenderBlendType )

Instance Methods

equals( other : RenderBlendComposeLogic ) : boolean

Class RenderInstructionBlendCompose

import { RenderInstructionBlendCompose } from 'scenerystack/alpenglow';

Constructor

new RenderInstructionBlendCompose( logic : RenderBlendComposeLogic )

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 ) : RenderInstructionBlendCompose

Type SerializedRenderBlendCompose

import type { SerializedRenderBlendCompose } from 'scenerystack/alpenglow';

Source Code

See the source for RenderBlendCompose.ts in the alpenglow repository.