RasterPremultipliedConverter¶
Overview¶
A RasterColorConverter which handles either sRGB or Display P3 for everything but we have: - client space: premultiplied - accumulation space: premultiplied linear - output space: 0-255 (non-premultiplied non-linear), so we can write to ImageData
This works well to share code, since the only difference is the gamut mapping (sRGB and Display P3 have the same transfer curve), and we want the same 0-255 non-premultiplied output.
@author Jonathan Olson <jonathan.olson@colorado.edu>
Class RasterPremultipliedConverter¶
Constructor¶
new RasterPremultipliedConverter( gamutMap : ( color: Vector4 ) => Vector4 )¶
Instance Methods¶
clientToAccumulation( client : Vector4 ) : Vector4¶
NOTE: DO NOT STORE THE VALUES OF THESE RESULTS, THEY ARE MUTATED. Create a copy if needed
clientToOutput( client : Vector4 ) : Vector4¶
NOTE: DO NOT STORE THE VALUES OF THESE RESULTS, THEY ARE MUTATED. Create a copy if needed
accumulationToOutput( accumulation : Vector4 ) : Vector4¶
NOTE: DO NOT STORE THE VALUES OF THESE RESULTS, THEY ARE MUTATED. Create a copy if needed
Static Methods¶
getOutOfGamutColor( color : Vector4 ) : Vector4¶
Static Properties¶
SRGB : RasterPremultipliedConverter¶
(readonly)
DISPLAY_P3 : RasterPremultipliedConverter¶
(readonly)
SRGB_SHOW_OUT_OF_GAMUT : RasterPremultipliedConverter¶
(readonly)
DISPLAY_P3_SHOW_OUT_OF_GAMUT : RasterPremultipliedConverter¶
(readonly)
Source Code¶
See the source for RasterPremultipliedConverter.ts in the alpenglow repository.