KallistiOS git master
Independent SDK for the Sega Dreamcast
|
Hardware Fog API for the PowerVR More...
Functions | |
void | pvr_fog_table_color (float a, float r, float g, float b) |
Set the table fog color. | |
void | pvr_fog_vertex_color (float a, float r, float g, float b) |
Set the vertex fog color. | |
void | pvr_fog_far_depth (float d) |
Set the fog far depth. | |
void | pvr_fog_table_exp2 (float density) |
Initialize the fog table using an exp2 algorithm (like GL_EXP2). | |
void | pvr_fog_table_exp (float density) |
Initialize the fog table using an exp algorithm (like GL_EXP). | |
void | pvr_fog_table_linear (float start, float end) |
Initialize the fog table using a linear algorithm (like GL_LINEAR). | |
void | pvr_fog_table_custom (float tbl1[]) |
Set a custom fog table from float values. | |
Hardware Fog API for the PowerVR
void pvr_fog_far_depth | ( | float | d | ) |
Set the fog far depth.
This function sets the PVR_FOG_DENSITY register appropriately for the specified value.
d | The depth to set |
void pvr_fog_table_color | ( | float | a, |
float | r, | ||
float | g, | ||
float | b ) |
Set the table fog color.
This function sets the color of fog for table fog. 0-1 range for all colors.
a | Alpha value of the fog |
r | Red value of the fog |
g | Green value of the fog |
b | Blue value of the fog |
void pvr_fog_table_custom | ( | float | tbl1[] | ) |
Set a custom fog table from float values.
This function allows you to specify whatever values you need to for your fog parameters. All values should be clamped between 0 and 1, and its your responsibility to set up the PVR_FOG_DENSITY register by calling pvr_fog_far_depth() with an appropriate value. The table passed in should have 129 entries, where the 0th entry is farthest from the eye and the last entry is nearest. Higher values = heavier fog.
tbl1 | The table of fog values to set |
void pvr_fog_table_exp | ( | float | density | ) |
Initialize the fog table using an exp algorithm (like GL_EXP).
This function will automatically set the PVR_FOG_DENSITY register to 259.999999 as a part of its processing, then set up the fog table.
density | Fog density value |
void pvr_fog_table_exp2 | ( | float | density | ) |
Initialize the fog table using an exp2 algorithm (like GL_EXP2).
This function will automatically set the PVR_FOG_DENSITY register to 259.999999 as a part of its processing, then set up the fog table.
density | Fog density value |
void pvr_fog_table_linear | ( | float | start, |
float | end ) |
Initialize the fog table using a linear algorithm (like GL_LINEAR).
This function will set the PVR_FOG_DENSITY register to the as appropriate for the end value, and initialize the fog table for perspectively correct linear fog.
start | Fog start point |
end | Fog end point |
void pvr_fog_vertex_color | ( | float | a, |
float | r, | ||
float | g, | ||
float | b ) |
Set the vertex fog color.
This function sets the fog color for vertex fog. 0-1 range for all colors. This function is currently not implemented, as vertex fog is not supported by KOS. Calling this function will cause an assertion failure.
a | Alpha value of the fog |
r | Red value of the fog |
g | Green value of the fog |
b | Blue value of the fog |