[iortcw] 146/152: All: Rend2: Add more ambient to lightmapped materials
Simon McVittie
smcv at debian.org
Fri Sep 8 10:40:28 UTC 2017
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to annotated tag 1.5a
in repository iortcw.
commit 9b31d6378505a756bda9ef7325778b697367db8e
Author: MAN-AT-ARMS <M4N4T4RMS at gmail.com>
Date: Thu Oct 27 18:42:45 2016 -0400
All: Rend2: Add more ambient to lightmapped materials
---
MP/code/rend2/glsl/lightall_fp.glsl | 3 +++
SP/code/rend2/glsl/lightall_fp.glsl | 3 +++
2 files changed, 6 insertions(+)
diff --git a/MP/code/rend2/glsl/lightall_fp.glsl b/MP/code/rend2/glsl/lightall_fp.glsl
index 531267c..5cb8233 100644
--- a/MP/code/rend2/glsl/lightall_fp.glsl
+++ b/MP/code/rend2/glsl/lightall_fp.glsl
@@ -274,6 +274,9 @@ void main()
ambientColor = lightColor;
float surfNL = clamp(dot(var_Normal.xyz, L), 0.0, 1.0);
+ // reserve 25% ambient to avoid black areas on normalmaps
+ lightColor *= 0.75;
+
// Scale the incoming light to compensate for the baked-in light angle
// attenuation.
lightColor /= max(surfNL, 0.25);
diff --git a/SP/code/rend2/glsl/lightall_fp.glsl b/SP/code/rend2/glsl/lightall_fp.glsl
index 531267c..5cb8233 100644
--- a/SP/code/rend2/glsl/lightall_fp.glsl
+++ b/SP/code/rend2/glsl/lightall_fp.glsl
@@ -274,6 +274,9 @@ void main()
ambientColor = lightColor;
float surfNL = clamp(dot(var_Normal.xyz, L), 0.0, 1.0);
+ // reserve 25% ambient to avoid black areas on normalmaps
+ lightColor *= 0.75;
+
// Scale the incoming light to compensate for the baked-in light angle
// attenuation.
lightColor /= max(surfNL, 0.25);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git
More information about the Pkg-games-commits
mailing list