1ALLEGRO_SHADER_TYPE(3)                                  ALLEGRO_SHADER_TYPE(3)
2
3
4

NAME

6       ALLEGRO_SHADER_TYPE - Allegro 5 API
7

SYNOPSIS

9              #include <allegro5/allegro.h>
10
11              typedef enum ALLEGRO_SHADER_TYPE ALLEGRO_SHADER_TYPE;
12

DESCRIPTION

14       Used     with     al_attach_shader_source(3)     and    al_attach_shad‐
15       er_source_file(3) to specify how to interpret the attached source.
16
17       ALLEGRO_VERTEX_SHADER
18              A vertex shader is executed for each vertex  it  is  used  with.
19              The program will output exactly one vertex at a time.
20
21              When  Allegro's  graphics are being used then in addition to all
22              vertices of primitives from the  primitives  addon,  each  drawn
23              bitmap also consists of four vertices.
24
25       ALLEGRO_PIXEL_SHADER
26              A  pixel shader is executed for each pixel it is used with.  The
27              program will output exactly one pixel at a time - either in  the
28              backbuffer or in the current target bitmap.
29
30              With Allegro's builtin graphics this means the shader is for ex‐
31              ample called for each destination pixel  of  the  output  of  an
32              al_draw_bitmap(3) call.
33
34              A  more  accurate term for pixel shader would be fragment shader
35              since one final pixel in the target bitmap  is  not  necessarily
36              composed  of only a single output but of multiple fragments (for
37              example when multi-sampling is being used).
38

SINCE

40       5.1.0
41
42
43
44Allegro reference manual                                ALLEGRO_SHADER_TYPE(3)
Impressum