Skip to content

RenderColorSpaceConversion

Overview

RenderProgram to convert between color spaces. Should not change whether something is transparent or opaque

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

Class RenderColorSpaceConversion

import { RenderColorSpaceConversion } from 'scenerystack/alpenglow';

Constructor

new RenderColorSpaceConversion( program : RenderProgram, convert : ( color: Vector4 ) => Vector4 )

Instance Methods

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

(protected)

evaluate( context : RenderEvaluationContext ) : Vector4

serialize() : SerializedRenderColorSpaceConversion

Instance Properties

inverse : Constructor<RenderColorSpaceConversion>

Static Methods

convert( renderProgram : RenderProgram, fromSpace : RenderColorSpace, toSpace : RenderColorSpace ) : RenderProgram

TODO: add a helper on RenderProgram

displayP3ToSRGB( renderProgram : RenderProgram ) : RenderProgram

sRGBToDisplayP3( renderProgram : RenderProgram ) : RenderProgram

displayP3ToLinearSRGB( renderProgram : RenderProgram ) : RenderProgram

linearSRGBToDisplayP3( renderProgram : RenderProgram ) : RenderProgram

oklabToSRGB( renderProgram : RenderProgram ) : RenderProgram

sRGBToOklab( renderProgram : RenderProgram ) : RenderProgram

oklabToDisplayP3( renderProgram : RenderProgram ) : RenderProgram

displayP3ToOklab( renderProgram : RenderProgram ) : RenderProgram

premulSRGBToPremulLinearSRGB( renderProgram : RenderProgram ) : RenderProgram

premulLinearSRGBToPremulSRGB( renderProgram : RenderProgram ) : RenderProgram

premulLinearSRGBToPremulDisplayP3( renderProgram : RenderProgram ) : RenderProgram

premulDisplayP3ToPremulLinearSRGB( renderProgram : RenderProgram ) : RenderProgram

premulDisplayP3ToPremulSRGB( renderProgram : RenderProgram ) : RenderProgram

premulSRGBToPremulDisplayP3( renderProgram : RenderProgram ) : RenderProgram

premulOklabToPremulSRGB( renderProgram : RenderProgram ) : RenderProgram

premulSRGBToPremulOklab( renderProgram : RenderProgram ) : RenderProgram

premulOklabToPremulDisplayP3( renderProgram : RenderProgram ) : RenderProgram

premulDisplayP3ToPremulOklab( renderProgram : RenderProgram ) : RenderProgram

deserialize( obj : SerializedRenderColorSpaceConversion ) : RenderColorSpaceConversion

Type SerializedRenderColorSpaceConversion

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

Source Code

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