From 1266339c0fd50df27bc987b2a4d00b2afe0d6269 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 19 May 2018 21:17:58 +0200 Subject: [PATCH] - fixed shader compilation. --- wadsrc/static/shaders/glsl/material_normal.fp | 2 +- wadsrc/static/zscript/statusbar/sbarinfowrapper.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wadsrc/static/shaders/glsl/material_normal.fp b/wadsrc/static/shaders/glsl/material_normal.fp index c251351d9..6b65de6a3 100644 --- a/wadsrc/static/shaders/glsl/material_normal.fp +++ b/wadsrc/static/shaders/glsl/material_normal.fp @@ -10,6 +10,7 @@ vec3 lightContribution(int i, vec3 normal) if (lightpos.w < lightdistance) return vec3(0.0); // Early out lights touching surface but not this fragment + vec3 lightdir = normalize(lightpos.xyz - pixelpos.xyz); float dotprod = dot(normal, lightdir); if (dotprod < 0.0) return vec3(0.0); // light hits from the backside. This can happen with full sector light lists and must be rejected for all cases. @@ -20,7 +21,6 @@ vec3 lightContribution(int i, vec3 normal) if (lightcolor.a < 0.0) // Sign bit is the attenuated light flag { - vec3 lightdir = normalize(lightpos.xyz - pixelpos.xyz); attenuation *= clamp(dotprod, 0.0, 1.0); } diff --git a/wadsrc/static/zscript/statusbar/sbarinfowrapper.txt b/wadsrc/static/zscript/statusbar/sbarinfowrapper.txt index efc6bedc8..96f006320 100644 --- a/wadsrc/static/zscript/statusbar/sbarinfowrapper.txt +++ b/wadsrc/static/zscript/statusbar/sbarinfowrapper.txt @@ -12,7 +12,7 @@ struct SBarInfo native ui } -// The sole purpose of this wrapper is to elimintate the native dependencies of the status bar object +// The sole purpose of this wrapper is to eliminate the native dependencies of the status bar object // because those would seriously impede the script conversion of the base class. class SBarInfoWrapper : BaseStatusBar