extern rtexture_t *r_texture_blanknormalmap;
extern rtexture_t *r_texture_white;
+extern rtexture_t *r_texture_grey128;
extern rtexture_t *r_texture_black;
extern rtexture_t *r_texture_notexture;
extern rtexture_t *r_texture_whitecube;
float *array_deformedsvector3f;
float *array_deformedtvector3f;
float *array_deformednormal3f;
+ float *array_generatedtexcoordtexture2f;
float *array_color4f;
float *array_texcoord3f;
float *lightmapcolor4f;
int lightmapcolor4f_bufferobject;
size_t lightmapcolor4f_bufferoffset;
+ float *texcoordtexture2f;
+ int texcoordtexture2f_bufferobject;
+ size_t texcoordtexture2f_bufferoffset;
+ float *texcoordlightmap2f;
+ int texcoordlightmap2f_bufferobject;
+ size_t texcoordlightmap2f_bufferoffset;
// transform matrices to render this entity and effects on this entity
matrix4x4_t matrix;
matrix4x4_t inversematrix;
#define SHADERPERMUTATION_FOG (1<<5) // tint the color by fog color or black if using additive blend mode
#define SHADERPERMUTATION_COLORMAPPING (1<<6) // indicates this is a colormapped skin
#define SHADERPERMUTATION_DIFFUSE (1<<7) // (lightsource) whether to use directional shading
-#define SHADERPERMUTATION_SPECULAR (1<<8) // (lightsource or deluxemapping) render specular effects
-#define SHADERPERMUTATION_CUBEFILTER (1<<9) // (lightsource) use cubemap light filter
-#define SHADERPERMUTATION_OFFSETMAPPING (1<<10) // adjust texcoords to roughly simulate a displacement mapped surface
-#define SHADERPERMUTATION_OFFSETMAPPING_RELIEFMAPPING (1<<11) // adjust texcoords to accurately simulate a displacement mapped surface (requires OFFSETMAPPING to also be set!)
+#define SHADERPERMUTATION_CONTRASTBOOST (1<<8) // r_glsl_contrastboost boosts the contrast at low color levels (similar to gamma)
+#define SHADERPERMUTATION_SPECULAR (1<<9) // (lightsource or deluxemapping) render specular effects
+#define SHADERPERMUTATION_CUBEFILTER (1<<10) // (lightsource) use cubemap light filter
+#define SHADERPERMUTATION_OFFSETMAPPING (1<<11) // adjust texcoords to roughly simulate a displacement mapped surface
+#define SHADERPERMUTATION_OFFSETMAPPING_RELIEFMAPPING (1<<12) // adjust texcoords to accurately simulate a displacement mapped surface (requires OFFSETMAPPING to also be set!)
-#define SHADERPERMUTATION_MAX (1<<12) // how many permutations are possible
+#define SHADERPERMUTATION_MAX (1<<13) // how many permutations are possible
#define SHADERPERMUTATION_MASK (SHADERPERMUTATION_MAX - 1) // mask of valid indexing bits for r_glsl_permutations[] array
// these are additional flags used only by R_GLSL_CompilePermutation
int loc_SpecularScale;
int loc_SpecularPower;
int loc_GlowScale;
- int loc_SceneBrightness;
+ int loc_SceneBrightness; // or: Scenebrightness * ContrastBoost
int loc_OffsetMapping_Scale;
int loc_AmbientColor;
int loc_DiffuseColor;
int loc_SpecularColor;
int loc_LightDir;
+ int loc_ContrastBoostCoeff; // 1 - 1/ContrastBoost
}
r_glsl_permutation_t;