Skip to content

Commit ada0c98

Browse files
committed
Document shader register flags RSF_*
1 parent d19a2a2 commit ada0c98

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

src/engine/renderer/tr_types.h

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,29 @@ using bool8_t = uint8_t;
9494
#define GL_INDEX_TYPE GL_UNSIGNED_INT
9595
using glIndex_t = unsigned int;
9696

97-
// TODO(0.56): drop RSF_LIGHT_ATTENUATION
97+
// "[implicit only]" means the flag only has effect if there is no shader text and the
98+
// shader was auto-generated from an image.
99+
// TODO(0.56): drop RSF_LIGHT_ATTENUATION, RSF_NOLIGHTSCALE
98100
enum RegisterShaderFlags_t {
101+
// nothing
99102
RSF_DEFAULT = BIT( 0 ),
103+
104+
// [implicit only] alter filter and wrap type
100105
RSF_2D = BIT( 1 ),
106+
107+
// load images without mipmaps
101108
RSF_NOMIP = BIT( 2 ),
109+
110+
// mip images to the screen size when they are larger than the screen
102111
RSF_FITSCREEN = BIT( 3 ),
112+
113+
// nothing
103114
RSF_LIGHT_ATTENUATION = BIT( 4 ),
104-
RSF_NOLIGHTSCALE = BIT( 5 ), // TODO(0.56): delete, does nothing
115+
116+
// nothing
117+
RSF_NOLIGHTSCALE = BIT( 5 ),
118+
119+
// when the shader is used on an entity sprite, face view direction instead of viewer
105120
RSF_SPRITE = BIT( 6 ),
106121
};
107122

0 commit comments

Comments
 (0)