1
0
forked from 0ad/0ad

Allow materials to disable receiving shadows

This was SVN commit r11500.
This commit is contained in:
Ykkrosh 2012-04-14 17:32:22 +00:00
parent 6410d36a55
commit a07dd82a70
2 changed files with 3 additions and 2 deletions

View File

@ -77,12 +77,13 @@ TEX tex, v_tex, texture[0], 2D;
LG2 temp.y, temp.y;
MUL temp.y, temp.y, specularPower.x;
EX2 temp.y, temp.y;
// TODO: why not just use POW here? (should test performance first)
MUL specular.rgb, specular, temp.y;
#endif
// color = (texdiffuse * sundiffuse + specular) * get_shadow() + texdiffuse * ambient;
// (sundiffuse is 2*fragment.color due to clamp-avoidance in the vertex program)
#if USE_SHADOW
#if USE_SHADOW && !DISABLE_RECEIVE_SHADOWS
#if USE_FP_SHADOW
#if USE_SHADOW_PCF
MOV offset.zw, v_shadow;

View File

@ -39,7 +39,7 @@ varying vec2 v_los;
float get_shadow()
{
#if USE_SHADOW
#if USE_SHADOW && !DISABLE_RECEIVE_SHADOWS
#if USE_SHADOW_SAMPLER
#if USE_SHADOW_PCF
return 0.25 * (