Skip to content
Snippets Groups Projects
Commit fc7b9ec9 authored by ZZYZX's avatar ZZYZX
Browse files

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

parent 469942d2
No related branches found
No related tags found
No related merge requests found
......@@ -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")]
......@@ -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
......
......@@ -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")]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment