mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-15 07:00:58 +00:00
Updated embedded shaders
This commit is contained in:
parent
ba8097a90e
commit
5e7e59cfe6
1 changed files with 32 additions and 5 deletions
|
@ -5639,7 +5639,7 @@ static const cgShaderDef_t cg_renderprogs[] =
|
|||
" localNormal = normalize( localNormal );\n"
|
||||
" \n"
|
||||
" // traditional very dark Lambert light model used in Doom 3\n"
|
||||
" half ldotN = dot3( localNormal, lightVector );\n"
|
||||
" half ldotN = saturate( dot3( localNormal, lightVector ) );\n"
|
||||
"\n"
|
||||
"#if defined(USE_HALF_LAMBERT)\n"
|
||||
" // RB: http://developer.valvesoftware.com/wiki/Half_Lambert\n"
|
||||
|
@ -5948,7 +5948,20 @@ static const cgShaderDef_t cg_renderprogs[] =
|
|||
" // RB end\n"
|
||||
" localNormal.z = sqrt( abs( dot( localNormal.xy, localNormal.xy ) - 0.25 ) );\n"
|
||||
" localNormal = normalize( localNormal );\n"
|
||||
" \n"
|
||||
" // traditional very dark Lambert light model used in Doom 3\n"
|
||||
" half ldotN = saturate( dot3( localNormal, lightVector ) );\n"
|
||||
"\n"
|
||||
"#if defined(USE_HALF_LAMBERT)\n"
|
||||
" // RB: http://developer.valvesoftware.com/wiki/Half_Lambert\n"
|
||||
" half halfLdotN = dot3( localNormal, lightVector ) * 0.5 + 0.5;\n"
|
||||
" halfLdotN *= halfLdotN;\n"
|
||||
"\n"
|
||||
" half lambert = halfLdotN;\n"
|
||||
"#else\n"
|
||||
" half lambert = ldotN;\n"
|
||||
"#endif\n"
|
||||
" \n"
|
||||
" const half specularPower = 10.0f;\n"
|
||||
" half hDotN = dot3( normalize( fragment.texcoord6.xyz ), localNormal );\n"
|
||||
" // RB: added abs\n"
|
||||
|
@ -5956,7 +5969,7 @@ static const cgShaderDef_t cg_renderprogs[] =
|
|||
"\n"
|
||||
" half3 diffuseColor = diffuseMap * rpDiffuseModifier.xyz;\n"
|
||||
" half3 specularColor = specMap.xyz * specularContribution * rpSpecularModifier.xyz;\n"
|
||||
" half3 lightColor = lightProj.xyz * lightFalloff.xyz; // ambient fix\n"
|
||||
" half3 lightColor = 1.0 * lightProj.xyz * lightFalloff.xyz;\n"
|
||||
"\n"
|
||||
" result.color.xyz = ( diffuseColor + specularColor ) * lightColor * fragment.color.xyz;\n"
|
||||
" result.color.w = 1.0;\n"
|
||||
|
@ -6158,14 +6171,28 @@ static const cgShaderDef_t cg_renderprogs[] =
|
|||
" // RB end\n"
|
||||
" localNormal.z = sqrt( abs( dot( localNormal.xy, localNormal.xy ) - 0.25 ) );\n"
|
||||
" localNormal = normalize( localNormal );\n"
|
||||
" \n"
|
||||
" // traditional very dark Lambert light model used in Doom 3\n"
|
||||
" half ldotN = saturate( dot3( localNormal, lightVector ) );\n"
|
||||
"\n"
|
||||
"#if defined(USE_HALF_LAMBERT)\n"
|
||||
" // RB: http://developer.valvesoftware.com/wiki/Half_Lambert\n"
|
||||
" half halfLdotN = dot3( localNormal, lightVector ) * 0.5 + 0.5;\n"
|
||||
" halfLdotN *= halfLdotN;\n"
|
||||
"\n"
|
||||
" half lambert = halfLdotN;\n"
|
||||
"#else\n"
|
||||
" half lambert = ldotN;\n"
|
||||
"#endif\n"
|
||||
" \n"
|
||||
" const half specularPower = 10.0f;\n"
|
||||
" half hDotN = dot3( normalize( fragment.texcoord6.xyz ), localNormal );\n"
|
||||
" half3 specularContribution = _half3( pow( hDotN, specularPower ) );\n"
|
||||
" // RB: added abs\n"
|
||||
" half3 specularContribution = _half3( pow( abs( hDotN ), specularPower ) );\n"
|
||||
"\n"
|
||||
" half3 diffuseColor = diffuseMap * rpDiffuseModifier.xyz;\n"
|
||||
" half3 specularColor = specMap.xyz * specularContribution * rpSpecularModifier.xyz;\n"
|
||||
" half3 lightColor = lightProj.xyz * lightFalloff.xyz; // ambient fix\n"
|
||||
" half3 lightColor = 1.0 * lightProj.xyz * lightFalloff.xyz;\n"
|
||||
"\n"
|
||||
" result.color.xyz = ( diffuseColor + specularColor ) * lightColor * fragment.color.xyz;\n"
|
||||
" result.color.w = 1.0;\n"
|
||||
|
@ -6438,7 +6465,7 @@ static const cgShaderDef_t cg_renderprogs[] =
|
|||
" localNormal = normalize( localNormal );\n"
|
||||
" \n"
|
||||
" // traditional very dark Lambert light model used in Doom 3\n"
|
||||
" half ldotN = dot3( localNormal, lightVector );\n"
|
||||
" half ldotN = saturate( dot3( localNormal, lightVector ) );\n"
|
||||
"\n"
|
||||
"#if defined(USE_HALF_LAMBERT)\n"
|
||||
" // RB: http://developer.valvesoftware.com/wiki/Half_Lambert\n"
|
||||
|
|
Loading…
Reference in a new issue