[ioquake3] 30/39: OpenGL2: Add more ambient to lightmapped materials.

Simon McVittie smcv at debian.org
Sat Nov 5 20:26:25 UTC 2016


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian/master
in repository ioquake3.

commit f7711a8119fa5020276f87a9344597b61c564708
Author: SmileTheory <SmileTheory at gmail.com>
Date:   Thu Oct 27 02:12:32 2016 -0700

    OpenGL2: Add more ambient to lightmapped materials.
---
 code/renderergl2/glsl/lightall_fp.glsl | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/code/renderergl2/glsl/lightall_fp.glsl b/code/renderergl2/glsl/lightall_fp.glsl
index 531267c..5cb8233 100644
--- a/code/renderergl2/glsl/lightall_fp.glsl
+++ b/code/renderergl2/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/ioquake3.git



More information about the Pkg-games-commits mailing list