ALLEGRO_SHADER_TYPE(3)
π ALLEGRO_SHADER_TYPE(3) π
okay so welcome to the Allegro reference manual, bestie β¨ this page is ALLEGRO_SHADER_TYPE(3), and we're about to make shader types make sense. no cap.
π NAME π
ALLEGRO_SHADER_TYPEβ Allegro 5 API π
β¨ SYNOPSIS β¨
#include <allegro5/allegro.h>
typedef enum ALLEGRO_SHADER_TYPE ALLEGRO_SHADER_TYPE;
π¦ DESCRIPTION π¦
so this enum is the little label you use with al_attach_shader_source(3) and al_attach_shader_source_file(3) to tell Allegro how it should interpret the source you're attaching. it's giving "what kind of shader is this?" energy π
ALLEGRO_VERTEX_SHADERβ a vertex shader gets executed for each vertex it's used with. the program will output exactly one vertex at a time, periodt. when Allegro's graphics are being used, then in addition to all vertices of primitives from the primitives addon, each drawn bitmap also consists of four vertices. iconic β¨ALLEGRO_PIXEL_SHADERβ a pixel shader gets executed for each pixel it's used with. the program will output exactly one pixel at a time - either in the backbuffer or in the current target bitmap. with Allegro's builtin graphics, this means the shader is for example called for each destination pixel of the output of anal_draw_bitmap(3)call. π«Ά
a more accurate term for pixel shader would be fragment shader, since one final pixel in the target bitmap is not necessarily composed of only a single output but of multiple fragments (for example when multi-sampling is being used). iykyk π
π SINCE π
5.1.0 πΈ
that's the whole page, bestie π β manual: Allegro reference manual; page: ALLEGRO_SHADER_TYPE(3); footer date: not shown, so no invented date energy πβ¨
π¦ where this page comes from
- arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms