메소드 | 설명 | |
---|---|---|
FirstPO2From ( uint n ) : uint |
Returns the closest power-of-two number greater or equal to value. 0 and 1 are powers of two, so firstPO2From(0)==0 and firstPO2From(1)==1. |
|
FixedToByteFixed ( uint value, int p ) : byte |
Convert N bit colour channel value to 8 bits, and return as a byte. It fills P bits with thebit pattern repeated. (this is /((1<<n)-1) in fixed point)
|
|
FixedToFixed ( uint value, int n, int p ) : uint |
Convert N bit colour channel value to P bits. It fills P bits with the bit pattern repeated. (this is /((1<<n)-1) in fixed point)
|
|
FixedToFloat ( uint value, int bits ) : float |
Fixed point to float
|
|
FloatToByteFixed ( float value ) : byte |
Convert floating point colour channel value between 0.0 and 1.0 (otherwise clamped) to an 8-bit integer, and return as a byte.
|
|
FloatToFixed ( float value, int bits ) : uint |
Convert floating point colour channel value between 0.0 and 1.0 (otherwise clamped) to integer of a certain number of bits. Works for any value of bits between 0 and 31.
|
|
FloatToHalf ( float f ) : ushort |
Convert a float32 to a float16 (NV_half_float) Courtesy of OpenEXR
|
|
FloatToHalfI ( uint i ) : ushort |
Converts float in uint format to a a half in ushort format
|
|
HalfToFloat ( ushort y ) : float |
Convert a float16 (NV_half_float) to a float32 Courtesy of OpenEXR
|
|
HalfToFloatI ( ushort y ) : uint |
Converts a half in ushort format to a float in uint format
|
|
IntRead ( |
Read a n*8 bits integer value to memory in native endian.
|
|
IntWrite ( |
||
IsPow2 ( int number ) : bool |
checks if a number is a power of 2
|
|
MostSignificantBitSet ( uint value ) : uint |
Returns the most significant bit set in a value.
|
public static FixedToByteFixed ( uint value, int p ) : byte | ||
value | uint | |
p | int | |
리턴 | byte |
public static FixedToFixed ( uint value, int n, int p ) : uint | ||
value | uint | |
n | int | |
p | int | |
리턴 | uint |
public static FixedToFloat ( uint value, int bits ) : float | ||
value | uint | |
bits | int | |
리턴 | float |
public static FloatToByteFixed ( float value ) : byte | ||
value | float | |
리턴 | byte |
public static FloatToFixed ( float value, int bits ) : uint | ||
value | float | |
bits | int | |
리턴 | uint |
public static IntRead ( |
||
src | ||
n | int | |
리턴 | uint |
public static IntWrite ( |
||
dest | ||
n | int | |
value | uint | |
리턴 | void |
public static MostSignificantBitSet ( uint value ) : uint | ||
value | uint | |
리턴 | uint |