![]() |
TGX 1.0.4
A tiny 2D/3D graphics library optimized for 32 bits microcontrollers.
|
Triangle shader functions. More...
#include "ShaderParams.h"Go to the source code of this file.
Functions | |
| TGX_INLINE int | tgx::shaderclip (int v, int maxv) |
| for texture clamping | |
| template<typename color_t, typename ZBUFFER_t> | |
| void | tgx::shader_test (const int32_t &offset, const int32_t &lx, const int32_t &ly, const int32_t &dx1, const int32_t &dy1, int32_t O1, const tgx::RasterizerVec4 &fP1, const int32_t &dx2, const int32_t &dy2, int32_t O2, const tgx::RasterizerVec4 &fP2, const int32_t &dx3, const int32_t &dy3, int32_t O3, const tgx::RasterizerVec4 &fP3, const tgx::RasterizerParams< color_t, color_t, ZBUFFER_t > &data) |
| For test purposes... | |
| template<typename color_t, typename ZBUFFER_t> | |
| void | tgx::shader_Flat (const int32_t &offset, const int32_t &lx, const int32_t &ly, const int32_t &dx1, const int32_t &dy1, int32_t O1, const RasterizerVec4 &fP1, const int32_t &dx2, const int32_t &dy2, int32_t O2, const RasterizerVec4 &fP2, const int32_t &dx3, const int32_t &dy3, int32_t O3, const RasterizerVec4 &fP3, const RasterizerParams< color_t, color_t, ZBUFFER_t > &data) |
| FLAT SHADING (NO ZBUFFER) | |
| template<typename color_t, typename ZBUFFER_t> | |
| void | tgx::shader_Gouraud (const int32_t &offset, const int32_t &lx, const int32_t &ly, const int32_t &dx1, const int32_t &dy1, int32_t O1, const RasterizerVec4 &fP1, const int32_t &dx2, const int32_t &dy2, int32_t O2, const RasterizerVec4 &fP2, const int32_t &dx3, const int32_t &dy3, int32_t O3, const RasterizerVec4 &fP3, const RasterizerParams< color_t, color_t, ZBUFFER_t > &data) |
| GOURAUD SHADING (NO Z BUFFER) | |
| template<typename color_t, typename ZBUFFER_t, bool TEXTURE_BILINEAR, bool TEXTURE_WRAP> | |
| void | tgx::shader_Flat_Texture (const int32_t &offset, const int32_t &lx, const int32_t &ly, const int32_t dx1, const int32_t dy1, int32_t O1, const RasterizerVec4 &fP1, const int32_t dx2, const int32_t dy2, int32_t O2, const RasterizerVec4 &fP2, const int32_t dx3, const int32_t dy3, int32_t O3, const RasterizerVec4 &fP3, const RasterizerParams< color_t, color_t, ZBUFFER_t > &data) |
| TEXTURE + FLAT SHADING (NO ZBUFFER) | |
| template<typename color_t, typename ZBUFFER_t, bool TEXTURE_BILINEAR, bool TEXTURE_WRAP> | |
| void | tgx::shader_Gouraud_Texture (const int32_t &offset, const int32_t &lx, const int32_t &ly, const int32_t dx1, const int32_t dy1, int32_t O1, const RasterizerVec4 &fP1, const int32_t dx2, const int32_t dy2, int32_t O2, const RasterizerVec4 &fP2, const int32_t dx3, const int32_t dy3, int32_t O3, const RasterizerVec4 &fP3, const RasterizerParams< color_t, color_t, ZBUFFER_t > &data) |
| TEXTURE + GOURAUD SHADING (NO ZBUFFER) | |
| template<typename color_t, typename ZBUFFER_t> | |
| void | tgx::shader_Flat_Zbuffer (const int32_t offset, const int32_t &lx, const int32_t &ly, const int32_t &dx1, const int32_t &dy1, int32_t O1, const RasterizerVec4 &fP1, const int32_t &dx2, const int32_t &dy2, int32_t O2, const RasterizerVec4 &fP2, const int32_t &dx3, const int32_t &dy3, int32_t O3, const RasterizerVec4 &fP3, const RasterizerParams< color_t, color_t, ZBUFFER_t > &data) |
| ZBUFFER + FLAT SHADING. | |
| template<typename color_t, typename ZBUFFER_t, int shiftC> | |
| void | tgx::shader_Gouraud_Zbuffer_sub (const int32_t &offset, const int32_t &lx, const int32_t &ly, const int32_t dx1, const int32_t dy1, int32_t O1, const RasterizerVec4 &fP1, const int32_t dx2, const int32_t dy2, int32_t O2, const RasterizerVec4 &fP2, const int32_t dx3, const int32_t dy3, int32_t O3, const RasterizerVec4 &fP3, const RasterizerParams< color_t, color_t, ZBUFFER_t > &data) |
| ZBUFFER + GOURAUD SHADING (sub-procedure, templated on shiftC) | |
| template<typename color_t, typename ZBUFFER_t> | |
| void | tgx::shader_Gouraud_Zbuffer (const int32_t &offset, const int32_t &lx, const int32_t &ly, const int32_t dx1, const int32_t dy1, int32_t O1, const RasterizerVec4 &fP1, const int32_t dx2, const int32_t dy2, int32_t O2, const RasterizerVec4 &fP2, const int32_t dx3, const int32_t dy3, int32_t O3, const RasterizerVec4 &fP3, const RasterizerParams< color_t, color_t, ZBUFFER_t > &data) |
| ZBUFFER + GOURAUD SHADING. | |
| template<typename color_t, typename ZBUFFER_t, bool TEXTURE_BILINEAR, bool TEXTURE_WRAP> | |
| void | tgx::shader_Flat_Texture_Zbuffer (const int32_t &offset, const int32_t &lx, const int32_t &ly, const int32_t dx1, const int32_t dy1, int32_t O1, const RasterizerVec4 &fP1, const int32_t dx2, const int32_t dy2, int32_t O2, const RasterizerVec4 &fP2, const int32_t dx3, const int32_t dy3, int32_t O3, const RasterizerVec4 &fP3, const RasterizerParams< color_t, color_t, ZBUFFER_t > &data) |
| ZBUFFER + TEXTURE + FLAT SHADING. | |
| template<typename color_t, typename ZBUFFER_t, bool TEXTURE_BILINEAR, bool TEXTURE_WRAP> | |
| void | tgx::shader_Gouraud_Texture_Zbuffer (const int32_t &offset, const int32_t &lx, const int32_t &ly, const int32_t dx1, const int32_t dy1, int32_t O1, const RasterizerVec4 &fP1, const int32_t dx2, const int32_t dy2, int32_t O2, const RasterizerVec4 &fP2, const int32_t dx3, const int32_t dy3, int32_t O3, const RasterizerVec4 &fP3, const RasterizerParams< color_t, color_t, ZBUFFER_t > &data) |
| ZBUFFER + TEXTURE + GOURAUD SHADING. | |
| template<typename color_t, typename ZBUFFER_t, bool TEXTURE_BILINEAR, bool TEXTURE_WRAP> | |
| void | tgx::shader_Flat_Texture_Ortho (const int32_t &offset, const int32_t &lx, const int32_t &ly, const int32_t dx1, const int32_t dy1, int32_t O1, const RasterizerVec4 &fP1, const int32_t dx2, const int32_t dy2, int32_t O2, const RasterizerVec4 &fP2, const int32_t dx3, const int32_t dy3, int32_t O3, const RasterizerVec4 &fP3, const RasterizerParams< color_t, color_t, ZBUFFER_t > &data) |
| TEXTURE + FLAT SHADING (NO ZBUFFER) + ORTHOGRAPHIC. | |
| template<typename color_t, typename ZBUFFER_t, bool TEXTURE_BILINEAR, bool TEXTURE_WRAP> | |
| void | tgx::shader_Gouraud_Texture_Ortho (const int32_t &offset, const int32_t &lx, const int32_t &ly, const int32_t dx1, const int32_t dy1, int32_t O1, const RasterizerVec4 &fP1, const int32_t dx2, const int32_t dy2, int32_t O2, const RasterizerVec4 &fP2, const int32_t dx3, const int32_t dy3, int32_t O3, const RasterizerVec4 &fP3, const RasterizerParams< color_t, color_t, ZBUFFER_t > &data) |
| TEXTURE + GOURAUD SHADING (NO ZBUFFER) + ORTHOGRAPHIC. | |
| template<typename color_t, typename ZBUFFER_t, bool TEXTURE_BILINEAR, bool TEXTURE_WRAP> | |
| void | tgx::shader_Flat_Texture_Zbuffer_Ortho (const int32_t &offset, const int32_t &lx, const int32_t &ly, const int32_t dx1, const int32_t dy1, int32_t O1, const RasterizerVec4 &fP1, const int32_t dx2, const int32_t dy2, int32_t O2, const RasterizerVec4 &fP2, const int32_t dx3, const int32_t dy3, int32_t O3, const RasterizerVec4 &fP3, const RasterizerParams< color_t, color_t, ZBUFFER_t > &data) |
| ZBUFFER + TEXTURE + FLAT SHADING + ORTHOGRAPHIC. | |
| template<typename color_t, typename ZBUFFER_t, bool TEXTURE_BILINEAR, bool TEXTURE_WRAP> | |
| void | tgx::shader_Gouraud_Texture_Zbuffer_Ortho (const int32_t &offset, const int32_t &lx, const int32_t &ly, const int32_t dx1, const int32_t dy1, int32_t O1, const RasterizerVec4 &fP1, const int32_t dx2, const int32_t dy2, int32_t O2, const RasterizerVec4 &fP2, const int32_t dx3, const int32_t dy3, int32_t O3, const RasterizerVec4 &fP3, const RasterizerParams< color_t, color_t, ZBUFFER_t > &data) |
| ZBUFFER + TEXTURE + GOURAUD SHADING + ORTHOGRAPHIC. | |
| template<int SHADER_FLAGS_ENABLED, typename color_t, typename ZBUFFER_t> | |
| void | tgx::shader_select (const int32_t &offset, const int32_t &lx, const int32_t &ly, const int32_t dx1, const int32_t dy1, int32_t O1, const RasterizerVec4 &fP1, const int32_t dx2, const int32_t dy2, int32_t O2, const RasterizerVec4 &fP2, const int32_t dx3, const int32_t dy3, int32_t O3, const RasterizerVec4 &fP3, const RasterizerParams< color_t, color_t, ZBUFFER_t > &data) |
| META-Shader THAT DISPATCH TO THE CORRECT Shader ABOVE (IF ENABLED). | |
| template<bool USE_BLENDING, typename color_t_im> | |
| void | tgx::shader_2D_gradient (const int32_t &offset, const int32_t &lx, const int32_t &ly, const int32_t dx1, const int32_t dy1, int32_t O1, const RasterizerVec4 &fP1, const int32_t dx2, const int32_t dy2, int32_t O2, const RasterizerVec4 &fP2, const int32_t dx3, const int32_t dy3, int32_t O3, const RasterizerVec4 &fP3, const RasterizerParams< color_t_im, color_t_im, float > &data) |
| 2D shader (gradient) | |
| template<bool USE_BLENDING, bool USE_MASKING, bool USE_GRADIENT, typename color_t_im, typename color_t_tex> | |
| void | tgx::shader_2D_texture (const int32_t &offset, const int32_t &lx, const int32_t &ly, const int32_t dx1, const int32_t dy1, int32_t O1, const RasterizerVec4 &fP1, const int32_t dx2, const int32_t dy2, int32_t O2, const RasterizerVec4 &fP2, const int32_t dx3, const int32_t dy3, int32_t O3, const RasterizerVec4 &fP3, const RasterizerParams< color_t_im, color_t_tex, float > &data) |
| 2D shader (texture) | |
| template<typename BLEND_OP, typename color_t_im, typename color_t_tex> | |
| void | tgx::shader_2D_texture_blend_op (const int32_t &offset, const int32_t &lx, const int32_t &ly, const int32_t dx1, const int32_t dy1, int32_t O1, const RasterizerVec4 &fP1, const int32_t dx2, const int32_t dy2, int32_t O2, const RasterizerVec4 &fP2, const int32_t dx3, const int32_t dy3, int32_t O3, const RasterizerVec4 &fP3, const RasterizerParams< color_t_im, color_t_tex, float, BLEND_OP > &data) |
| 2D shader (texture with custom blending operator) | |
Triangle shader functions.