xycaleth / OpenJK

Community effort to maintain and improve Jedi Academy + Jedi Outcast released by Raven Software
GNU General Public License v2.0
16 stars 3 forks source link

lightmapscale value inverts lightmap #4

Closed DT85 closed 10 years ago

DT85 commented 10 years ago

q3gl2_sun 240 238 200 50 195 75 3 15 0.2

ioquake3: http://i58.tinypic.com/rab96b.png

OpenJK rend2: http://i62.tinypic.com/1yn3oo.jpg

xycaleth commented 10 years ago

What do you have the following cvars set to:

xycaleth commented 10 years ago

Nevermind, tracked down the problem.

Your usage of q3gl2_sun appears to be wrong. The syntax is:

q3gl2_sun <red> <green> <blue> <intensity> <direction> <elevation> <light scale> <shadow scale>

You have an extra value in your line though. The 15 (which is taken as the shadow scale) causes the shadow to get much lighter, and so the 'lit' areas appear to be darker than your shadowed areas.

I would recommend something like this: q3gl2_sun 240 238 200 50 195 75 3 0.2

DT85 commented 10 years ago

• r_hdr 1 • r_sunlightMode 1 • r_floatLightmap 0

xycaleth commented 10 years ago

Just added another comment ;)

You should be setting the shadow scale to a value between 0 and 1. I guess I should add a check in the code to prevent this problem from happening.