Functions
Functions
Graphics » HAL GFX » GFX INTERPOLATORS
Collaboration diagram for Functions:

## Functions
void | hal_gfx_interpolate_rect_colors (int x0, int y0, int w, int h, color_var_t *col0, color_var_t *col1, color_var_t *col2)
| Interpolate color gradient for rectangle. More...
void | hal_gfx_interpolate_tri_colors (float x0, float y0, float x1, float y1, float x2, float y2, color_var_t *col0, color_var_t *col1, color_var_t *col2)
| Interpolate color gradient for triangle. More...
void | hal_gfx_interpolate_tri_depth (float x0, float y0, float z0, float x1, float y1, float z1, float x2, float y2, float z2)
| Interpolate depth buffer values for triangle. More...
void | hal_gfx_interpolate_tx_ty (float x0, float y0, float w0, float tx0, float ty0, float x1, float y1, float w1, float tx1, float ty1, float x2, float y2, float w2, float tx2, float ty2, int tex_width, int tex_height)
| Interpolate texture values for triangle. More...

## Detailed Description

## Function Documentation

## ◆ hal_gfx_interpolate_rect_colors()

void hal_gfx_interpolate_rect_colors | ( | int | x0,
|  | int | y0,
|  | int | w,
|  | int | h,
|  | color_var_t * | col0,
|  | color_var_t * | col1,
|  | color_var_t * | col2
| ) |  |

Interpolate color gradient for rectangle.

Parameters

  [in] | x0 | x coordinate of the upper left vertex of the rectangle
  [in] | y0 | y coordinate at the upper left vertex of the rectangle
  [in] | w | width of the rectangle
  [in] | h | height of the rectangle
  [in] | col0 | color for the first vertex
  [in] | col1 | color for the second vertex
  [in] | col2 | color for the third vertex

## ◆ hal_gfx_interpolate_tri_colors()

void hal_gfx_interpolate_tri_colors | ( | float | x0,
|  | float | y0,
|  | float | x1,
|  | float | y1,
|  | float | x2,
|  | float | y2,
|  | color_var_t * | col0,
|  | color_var_t * | col1,
|  | color_var_t * | col2
| ) |  |

Interpolate color gradient for triangle.

Parameters

  [in] | x0 | x coordinate at the first vertex of the triangle
  [in] | y0 | y coordinate at the first vertex of the triangle
  [in] | x1 | x coordinate at the second vertex of the triangle
  [in] | y1 | y coordinate at the second vertex of the triangle
  [in] | x2 | x coordinate at the third vertex of the triangle
  [in] | y2 | y coordinate at the third vertex of the triangle
  [in] | col0 | color for the first vertex
  [in] | col1 | color for the second vertex
  [in] | col2 | color for the third vertex

## ◆ hal_gfx_interpolate_tri_depth()

void hal_gfx_interpolate_tri_depth | ( | float | x0,
|  | float | y0,
|  | float | z0,
|  | float | x1,
|  | float | y1,
|  | float | z1,
|  | float | x2,
|  | float | y2,
|  | float | z2
| ) |  |

Interpolate depth buffer values for triangle.

Parameters

  [in] | x0 | coordinate at the first vertex of the triangle
  [in] | y0 | coordinate at the first vertex of the triangle
  [in] | z0 | coordinate at the first vertex of the triangle
  [in] | x1 | coordinate at the second vertex of the triangle
  [in] | y1 | coordinate at the second vertex of the triangle
  [in] | z1 | coordinate at the second vertex of the triangle
  [in] | x2 | coordinate at the third vertex of the triangle
  [in] | y2 | coordinate at the third vertex of the triangle
  [in] | z2 | coordinate at the third vertex of the triangle

## ◆ hal_gfx_interpolate_tx_ty()

void hal_gfx_interpolate_tx_ty | ( | float | x0,
|  | float | y0,
|  | float | w0,
|  | float | tx0,
|  | float | ty0,
|  | float | x1,
|  | float | y1,
|  | float | w1,
|  | float | tx1,
|  | float | ty1,
|  | float | x2,
|  | float | y2,
|  | float | w2,
|  | float | tx2,
|  | float | ty2,
|  | int | tex_width,
|  | int | tex_height
| ) |  |

Interpolate texture values for triangle.

Parameters

  [in] | x0 | x coordinate at the first vertex of the triangle
  [in] | y0 | y coordinate at the first vertex of the triangle
  [in] | w0 | w coordinate at the first vertex of the triangle
  [in] | tx0 | x texture coordinate at the first vertex of the triangle
  [in] | ty0 | y texture coordinate at the first vertex of the triangle
  [in] | x1 | x coordinate at the second vertex of the triangle
  [in] | y1 | y coordinate at the second vertex of the triangle
  [in] | w1 | w coordinate at the second vertex of the triangle
  [in] | tx1 | x texture coordinate at the second vertex of the triangle
  [in] | ty1 | y texture coordinate at the second vertex of the triangle
  [in] | x2 | x coordinate at the third vertex of the triangle
  [in] | y2 | y coordinate at the third vertex of the triangle
  [in] | w2 | w coordinate at the third vertex of the triangle
  [in] | tx2 | x texture coordinate at the third vertex of the triangle
  [in] | ty2 | x texture coordinate at the third vertex of the triangle
  [in] | tex_width | texture width
  [in] | tex_height | texture height