w23 / OpenSource

Load Source games maps as combined meshes correctly positioned relative to each other
Do What The F*ck You Want To Public License
157 stars 16 forks source link

Black Mesa maps are too dark #77

Open zEvilCube opened 1 year ago

zEvilCube commented 1 year ago

This is probably because the game itself is very dark, but is there a way to make maps brighter in this program?

OpenSource_AWTgcEQtf6

Here's .cfg and .bat files I used misc.zip

w23 commented 1 year ago

I can think of a few reasons why it might be so:

  1. OpenSource doesn't support HDR lightmaps, it only supports the older format.
  2. It doesn't support lightstyles (which are used for e.g. different lamps turned on) and will only read the first one.

I'm not in a capacity right now to implement any of the above. So I can offer a temp workaround of just multiplying the lightmap color by some kind of a number > 1 here: https://github.com/w23/OpenSource/blob/454773e75f458e415a9f3c79409b686661616b83/src/render.c#L401 E.g. "vec3 lm = texture2D(u_lightmap, v_lightmap_uv).xyz * 2.f;\n"

Another option would be to disable lightmaps completely: https://github.com/w23/OpenSource/blob/454773e75f458e415a9f3c79409b686661616b83/src/material.c#L132 Change it to ctx->mat->shader = MShader_UnlitGeneric;