summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f797950)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9305
d7cf8633-e32d-0410-b094-
e92efae38249
t->specularpower = r_shadow_gloss2exponent.value;
}
}
t->specularpower = r_shadow_gloss2exponent.value;
}
}
+ t->specularpower *= t->specularpowermod;
// lightmaps mode looks bad with dlights using actual texturing, so turn
// off the colormap and glossmap, but leave the normalmap on as it still
// lightmaps mode looks bad with dlights using actual texturing, so turn
// off the colormap and glossmap, but leave the normalmap on as it still
shader.reflectfactor = 1;
Vector4Set(shader.reflectcolor4f, 1, 1, 1, 1);
shader.r_water_wateralpha = 1;
shader.reflectfactor = 1;
Vector4Set(shader.reflectcolor4f, 1, 1, 1, 1);
shader.r_water_wateralpha = 1;
+ shader.specularpowermod = 1;
strlcpy(shader.name, com_token, sizeof(shader.name));
if (!COM_ParseToken_QuakeC(&text, false) || strcasecmp(com_token, "{"))
strlcpy(shader.name, com_token, sizeof(shader.name));
if (!COM_ParseToken_QuakeC(&text, false) || strcasecmp(com_token, "{"))
Vector4Set(shader.reflectcolor4f, atof(parameter[8]), atof(parameter[9]), atof(parameter[10]), 1);
shader.r_water_wateralpha = atof(parameter[11]);
}
Vector4Set(shader.reflectcolor4f, atof(parameter[8]), atof(parameter[9]), atof(parameter[10]), 1);
shader.r_water_wateralpha = atof(parameter[11]);
}
+ else if (!strcasecmp(parameter[0], "dp_specularpowermod") && numparameters >= 2)
+ {
+ shader.specularpowermod = atof(parameter[1]);
+ }
else if (!strcasecmp(parameter[0], "deformvertexes") && numparameters >= 2)
{
int i, deformindex;
else if (!strcasecmp(parameter[0], "deformvertexes") && numparameters >= 2)
{
int i, deformindex;
texflagsmask &= ~TEXF_PICMIP;
if(!(defaulttexflags & TEXF_COMPRESS))
texflagsmask &= ~TEXF_COMPRESS;
texflagsmask &= ~TEXF_PICMIP;
if(!(defaulttexflags & TEXF_COMPRESS))
texflagsmask &= ~TEXF_COMPRESS;
+ texture->specularpowermod = 1; // unless later loaded from the shader
texture->reflectfactor = shader->reflectfactor;
Vector4Copy(shader->reflectcolor4f, texture->reflectcolor4f);
texture->r_water_wateralpha = shader->r_water_wateralpha;
texture->reflectfactor = shader->reflectfactor;
Vector4Copy(shader->reflectcolor4f, texture->reflectcolor4f);
texture->r_water_wateralpha = shader->r_water_wateralpha;
+ texture->specularpowermod = shader->specularpowermod;
}
else if (!strcmp(texture->name, "noshader") || !texture->name[0])
{
}
else if (!strcmp(texture->name, "noshader") || !texture->name[0])
{
float reflectfactor; // amount of reflection distort (1.0 = like the cvar specifies)
vec4_t reflectcolor4f; // color tint of reflection (including alpha factor)
float r_water_wateralpha; // additional wateralpha to apply when r_water is active
float reflectfactor; // amount of reflection distort (1.0 = like the cvar specifies)
vec4_t reflectcolor4f; // color tint of reflection (including alpha factor)
float r_water_wateralpha; // additional wateralpha to apply when r_water is active
-#define Q3SHADERINFO_COMPARE_END r_water_wateralpha
+
+ // gloss
+ float specularpowermod;
+#define Q3SHADERINFO_COMPARE_END specularpowermod
float reflectfactor; // amount of reflection distort (1.0 = like the cvar specifies)
vec4_t reflectcolor4f; // color tint of reflection (including alpha factor)
float r_water_wateralpha; // additional wateralpha to apply when r_water is active
float reflectfactor; // amount of reflection distort (1.0 = like the cvar specifies)
vec4_t reflectcolor4f; // color tint of reflection (including alpha factor)
float r_water_wateralpha; // additional wateralpha to apply when r_water is active
+
+ // gloss
+ float specularpowermod;