Bug 6058 - OpenGL2: with r_dlightmode enabled (1-3) some multilayered textures are badly illuminated.
Status: ASSIGNED
Alias: None
Product: ioquake3
Classification: Unclassified
Component: Video
Version: unspecified
Hardware: PC Windows NT
: P3 normal
Assignee: James Canete
QA Contact: ioquake3 bugzilla mailing list
URL:
Depends on:
Blocks:
 
Reported: 2013-11-10 12:54 EST by Kuehnhammer Tobias
Modified: 2017-01-21 12:07:08 EST
1 user (show)

See Also:


Attachments
screenshot of issue bad textures (154.46 KB, image/jpeg)
2013-11-10 12:54 EST, Kuehnhammer Tobias
Solution (3.53 KB, patch)
2016-11-19 15:32 EST, Eugene C.

Description Kuehnhammer Tobias 2013-11-10 12:54:12 EST
Created attachment 3397 [details]
screenshot of issue bad textures

OpenGL2: with r_dlightmode enabled (1-3) some multilayered textures are badly illuminated.

Start a map with multilayered textures (e.g. q3dm2) choose 'gauntlet' and press the fire button. Search for multilayered textures (e.g.: floor markers, wet walls). Some of these textures are darker. They are not correctly illuminated.

See the attached screenshot for a series of badly illuminated multilayered textures (q3dm2/q3dm5/q3tourney4).

I'm on Windows 7, Nvidia

Tobias Kuehnhammer.
Comment 1 James Canete 2013-11-20 05:57:01 EST
There isn't a quick fix for this one.

The problem is the multilayered textures.  r_dlightmode > 1 uses an additional pass of additive blending to brighten textures, but this doesn't work with multilayered textures.  The current behavior is to fallback to Q3's original dynamic lighting, but the difference is obvious.

The solutions I can think of are:
- implement dynamic lighting in the lightall glsl shader.  This would increase the number of glsl shaders compiled (something I've been trying to lower) but is the simplest fix, and would remove a (small) rendering pass.
- reimplement the renderer as deferred.  I'd like to avoid this, as it is a huge job, and will probably break a lot of shaders for a long time until everything settles.
Comment 2 Eugene C. 2016-11-19 15:32:39 EST
Created attachment 3571 [details]
Solution

Don't worry, be happy
Comment 3 Kuehnhammer Tobias 2017-01-21 12:07:08 EST
Eugene C., you are genius!
Your patch will fix this long standing rendering issue (at least for me). Incomprehensible why this isn't in the ioquake3 trunk...
Thank you very much Eugene C.! As an Amateur I was looking for a fix for ages!Well done!

Tobias Kuehnhammer.