/** * @brief */ void R_UseTints_null(void) { r_null_program_t *p = &r_null_program; for (int32_t i = 0; i < TINT_TOTAL; i++) { if (r_view.current_entity->tints[i][3]) { R_ProgramParameter4fv(&p->tints[i], r_view.current_entity->tints[i]); } else { R_ProgramParameter4fv(&p->tints[i], r_state.active_material->cm->tintmap_defaults[i]); } } }
/** * @brief */ void R_UseCurrentColor_null(const vec4_t color) { r_null_program_t *p = &r_null_program; const vec4_t white = { 1.0, 1.0, 1.0, 1.0 }; if (color && r_state.color_array_enabled) { R_ProgramParameter4fv(&p->current_color, color); } else { R_ProgramParameter4fv(&p->current_color, white); } }
static void R_InitGeoscapeProgram (r_program_t* prog) { static vec4_t defaultColor = {0.0, 0.0, 0.0, 1.0}; static vec4_t cityLightColor = {1.0, 1.0, 0.8, 1.0}; static vec2_t uvScale = {2.0, 1.0}; R_ProgramParameter1i("SAMPLER_DIFFUSE", 0); R_ProgramParameter1i("SAMPLER_BLEND", 1); R_ProgramParameter1i("SAMPLER_NORMALMAP", 2); R_ProgramParameter4fv("DEFAULTCOLOR", defaultColor); R_ProgramParameter4fv("CITYLIGHTCOLOR", cityLightColor); R_ProgramParameter2fv("UVSCALE", uvScale); }
/** * @brief */ void R_InitProgram_null(r_program_t *program) { r_null_program_t *p = &r_null_program; R_ProgramVariable(&program->attributes[R_ARRAY_POSITION], R_ATTRIBUTE, "POSITION", true); R_ProgramVariable(&program->attributes[R_ARRAY_COLOR], R_ATTRIBUTE, "COLOR", true); R_ProgramVariable(&program->attributes[R_ARRAY_DIFFUSE], R_ATTRIBUTE, "TEXCOORD", true); R_ProgramVariable(&program->attributes[R_ARRAY_NEXT_POSITION], R_ATTRIBUTE, "NEXT_POSITION", true); R_ProgramVariable(&p->sampler0, R_SAMPLER_2D, "SAMPLER0", true); R_ProgramVariable(&p->fog.start, R_UNIFORM_FLOAT, "FOG.START", true); R_ProgramVariable(&p->fog.end, R_UNIFORM_FLOAT, "FOG.END", true); R_ProgramVariable(&p->fog.color, R_UNIFORM_VEC3, "FOG.COLOR", true); R_ProgramVariable(&p->fog.density, R_UNIFORM_FLOAT, "FOG.DENSITY", true); R_ProgramVariable(&p->current_color, R_UNIFORM_VEC4, "GLOBAL_COLOR", true); R_ProgramVariable(&p->time_fraction, R_UNIFORM_FLOAT, "TIME_FRACTION", true); R_ProgramParameter1i(&p->sampler0, R_TEXUNIT_DIFFUSE); R_ProgramParameter1f(&p->fog.density, 0.0); const vec4_t white = { 1.0, 1.0, 1.0, 1.0 }; R_ProgramParameter4fv(&p->current_color, white); R_ProgramParameter1f(&p->time_fraction, 0.0f); }
static void R_InitCombine2Program (r_program_t* prog) { GLfloat defaultColor[4] = {0.0, 0.0, 0.0, 0.0}; R_ProgramParameter1i("SAMPLER0", 0); R_ProgramParameter1i("SAMPLER1", 1); R_ProgramParameter4fv("DEFAULTCOLOR", defaultColor); }
static void R_InitAtmosphereProgram (r_program_t* prog) { static vec4_t defaultColor = {0.0, 0.0, 0.0, 1.0}; static vec2_t uvScale = {2.0, 1.0}; R_ProgramParameter1i("SAMPLER_DIFFUSE", 0); R_ProgramParameter1i("SAMPLER_NORMALMAP", 2); R_ProgramParameter4fv("DEFAULTCOLOR", defaultColor); R_ProgramParameter2fv("UVSCALE", uvScale); }
static void R_UseWarpProgram (r_program_t* prog) { static vec4_t offset; offset[0] = offset[1] = refdef.time / 8.0; R_ProgramParameter4fv("OFFSET", offset); if (r_fog->integer) { if (r_state.fog_enabled) { R_ProgramParameter3fv("FOGCOLOR", refdef.fogColor); R_ProgramParameter1f("FOGDENSITY", refdef.fogColor[3]); R_ProgramParameter2fv("FOGRANGE", fogRange); } else { R_ProgramParameter1f("FOGDENSITY", 0.0f); } } }
static void R_InitWarpProgram (r_program_t* prog) { static vec4_t offset; R_ProgramParameter1i("SAMPLER_DIFFUSE", 0); R_ProgramParameter1i("SAMPLER_WARP", 1); R_ProgramParameter1i("SAMPLER_GLOWMAP", 4); R_ProgramParameter1f("GLOWSCALE", 0.0); R_ProgramParameter4fv("OFFSET", offset); if (r_fog->integer) { if (r_state.fog_enabled) { R_ProgramParameter3fv("FOGCOLOR", refdef.fogColor); R_ProgramParameter1f("FOGDENSITY", refdef.fogColor[3]); R_ProgramParameter2fv("FOGRANGE", fogRange); } else { R_ProgramParameter1f("FOGDENSITY", 0.0f); } } }