Removed dynlight-surface angle clip threshold - it didn't work properly anyway

This commit is contained in:
ZZYZX 2017-02-01 16:53:19 +02:00
parent 469942d263
commit fc7b9ec9a8
3 changed files with 5 additions and 5 deletions

View file

@ -30,6 +30,6 @@ using CodeImp.DoomBuilder;
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.3.0.2851")]
[assembly: AssemblyVersion("2.3.0.2852")]
[assembly: NeutralResourcesLanguageAttribute("en")]
[assembly: AssemblyHash("42c2fc2")]
[assembly: AssemblyHash("469942d")]

View file

@ -234,12 +234,12 @@ float4 ps_vertex_color(PixelData pd) : COLOR
}
//mxd. dynamic light pixel shader pass, dood!
float4 ps_lightpass(LitPixelData pd) : COLOR
float4 ps_lightpass(LitPixelData pd) : COLOR
{
//is face facing away from light source?
// [ZZ] oddly enough pd.normal is not a proper normal, so using dot on it returns rather unexpected results. wrapped in normalize().
float diffuseContribution = dot(normalize(pd.normal), normalize(lightPosAndRadius.xyz - pd.pos_w));
if (diffuseContribution < -0.1f) // (lightPosAndRadius.xyz - pd.pos_w) == direction from light to current pixel
if (diffuseContribution < 0)
clip(-1);
diffuseContribution = max(diffuseContribution, 0); // to make sure

View file

@ -29,5 +29,5 @@ using System.Resources;
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.3.0.2851")]
[assembly: AssemblyVersion("2.3.0.2852")]
[assembly: NeutralResourcesLanguageAttribute("en")]