Add rygorous's float->srgb8 conversion routine to the stdlib.
Issue #230
This commit is contained in:
@@ -147,6 +147,7 @@ Contents:
|
||||
|
||||
* `Converting Between Array-of-Structures and Structure-of-Arrays Layout`_
|
||||
* `Conversions To and From Half-Precision Floats`_
|
||||
* `Converting to sRGB8`_
|
||||
|
||||
+ `Systems Programming Support`_
|
||||
|
||||
@@ -3691,6 +3692,22 @@ precise.
|
||||
uniform int16 float_to_half_fast(uniform float f)
|
||||
|
||||
|
||||
Converting to sRGB8
|
||||
-------------------
|
||||
|
||||
The sRGB color space is used in many applications in graphics and imaging;
|
||||
see the `Wikipedia page on sRGB`_ for more information. The ``ispc``
|
||||
standard library provides two functions for converting floating-point color
|
||||
values to 8-bit values in the sRGB space.
|
||||
|
||||
.. _Wikipedia page on sRGB: http://en.wikipedia.org/wiki/SRGB
|
||||
|
||||
::
|
||||
|
||||
int float_to_srgb8(float v)
|
||||
uniform int float_to_srgb8(uniform float v)
|
||||
|
||||
|
||||
Systems Programming Support
|
||||
---------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user