Skip to content

[MOD] Lighting Pack for the Enhanced Edition

argent77argent77 Member Posts: 3,474
edited January 2021 in General Modding

Shader Pack: Lighting adjustments for the Enhanced Edition

A visual enhancement mod for BG:EE, SoD, BG2:EE and IWD:EE

Download (latest)

Readme (with previews)


Description:
The original Infinity Engine games provided options to adjust brightness and contrast which helped a lot, especially in dark dungeons or at night time. Unfortunately these options have been removed from the Enhanced Editions of the games.

This mod provides a way to bring back the means to adjust brightness, contrast and gamma correction. You can choose from a set of predefined lighting configurations or enter the desired values manually.

Since version 3.0 of the mod you can also adjust color temperature as well as hue, saturation and lightness. The latter set of options has been marked as "Advanced Settings" as they are useful only in specific cases.

Note: Changes made by this mod will not be visible if you select "Alternative renderer" in the graphics options of the games.
Post edited by argent77 on

Comments

  • agrisagris Member Posts: 581
    Hey @argent77‌, this mod is great! I've noticed on problem though, any settings, even the game's default (1, 0, 1 entered via 22, iirc) result in the red overlay showing damage to a character to be rendered at essentially black. Could you look into this? It's the only thing keeping me from using, as it looks like my characters' portraits are blacked out when they take damage.
  • argent77argent77 Member Posts: 3,474
    @agris‌ Yep, that's definitely a bug. It'll be fixed in the next release.
  • argent77argent77 Member Posts: 3,474
    @agris‌ Bug has been fixed.

    New version 2.1 of the Shader Pack can be downloaded from the link in the first post.
  • argent77argent77 Member Posts: 3,474
    The Shader Pack has been updated to v2.2. You can find the download link in the first post.

    Changes:
    - Added support for the latest BG2:EE update (which is currently in open beta).
  • argent77argent77 Member Posts: 3,474
    New Update: The Shader Pack has been updated to v2.3! You can find the download link and more details in the first post.

    Changes:
    - Added support for Enhanced Edition patches v2.0
    - Added check to prevent modifying files more than once
  • agrisagris Member Posts: 581
    @argent77 When manually entering the brightness, the installer rejects ".03" and to get it to accept the value I have to enter 0.03. Not sure if that's something you can fix or not, but FYI.
  • argent77argent77 Member Posts: 3,474
    I'm using a strict format check for entered values to make sure that they don't cause syntax error in the shader script files. Tbh, I've never tried out whether GLSL accepts floating point values without decimal part, but it seems to work. I'll fix it in the next release.
  • argent77argent77 Member Posts: 3,474
    New Update: The Shader Pack has been updated to v2.4! You can find the download link and more details in the first post.

    Changes:
    • Added support for Enhanced Edition patch v2.1
    • Improved validation of numbers in manual input subcomponent
  • mashedtatersmashedtaters Member Posts: 2,266
    Just wanted to say I love this mod.
  • AlonsoAlonso Member Posts: 806
    First, thank you for this mod. Very useful.

    And my question: In the instructions you say that one of the files is used for map background. What is map background?
  • argent77argent77 Member Posts: 3,474
    edited February 2019
    Alonso wrote: »
    And my question: In the instructions you say that one of the files is used for map background. What is map background?

    It's basically the tileset of the map (i.e. the static background as well as water/lava overlays). Dynamic stuff such as creatures, visual effects or animations are not affected by this file.
  • AlonsoAlonso Member Posts: 806
    I have tried to modify the lighting of the map background, but it doesn't work for me. I tried several values in the fpseam.glsl file, but they don't change how the game looks:

    Contrast: 1.2. Brightness: 0.1. Gamma: 1.1.
    1x2qkpblyzcl.png

    Contrast: 2.0. Brightness: 1.0. Gamma: 2.0.
    4078t7lcusjc.png

    Contrast: 10.0. Brightness: 10.0. Gamma: 10.0.
    jghn4thbfh58.png

    Am I doing something wrong?
  • argent77argent77 Member Posts: 3,474
    edited March 2019
    Have you enabled the DirectX renderer (Options > Graphics > Alternate renderer)? That renderer uses a completely different set of shader files.

    This mod does only work with the (default) OpenGL renderer.
  • AlonsoAlonso Member Posts: 806
    No, I haven't enabled the alternate renderer. Anyway, it looks like it's a problem of mod compatibility, because I have several mods installed. I just tried your mod with a clean installation and it works. I've also had some other minor issues with the other mods, so it's probably best to remove and reinstall everything. Thank you anyway.
  • GoidaGoida Member Posts: 118
    edited March 2019
    Amazing stuff. Now my light spot-enabled projectiles will actually show. Yes, argent? Increasing contrast will bring more shadows and bring out glows? And by the way, what about saturation? I may want to increase contrast, but that always requires toning down saturation. It would especially in SoD, where many areas are acidic-colored as they are.

    @argent77
    Post edited by Goida on
  • argent77argent77 Member Posts: 3,474
    I like the idea, and having more options available is always good.

    Modifying saturation requires to perform some color space conversions though. I'll have to see if or how that can be done in pixel shaders first.
  • argent77argent77 Member Posts: 3,474
    I found some promising shader-specific code examples about color space conversions, so saturation (as well as hue and lightness) won't be a real problem. I also stumbled across an interesting article about calculating color temperature. Maybe I can implement that too.
  • AlonsoAlonso Member Posts: 806
    Alonso wrote: »
    No, I haven't enabled the alternate renderer. Anyway, it looks like it's a problem of mod compatibility, because I have several mods installed. I just tried your mod with a clean installation and it works. I've also had some other minor issues with the other mods, so it's probably best to remove and reinstall everything. Thank you anyway.

    I finally reinstalled everything, and I still have the same problem. The general lighting adjustments work well, but the background adjustments in the file fpseam.glsl don't work, so it looks like it's a problem of mod compatibility. The mods I have installed are Ascension, Tweaks Anthology, SCS, Portraits Everywhere, Jimfix and EE UI Tweaks. Any idea of what might be causing the problem?
  • argent77argent77 Member Posts: 3,474
    Can you post your WeiDU.log (in spoiler tags or as attachment)? Attaching the patched fpseam.glsl would also be helpful.
  • AlonsoAlonso Member Posts: 806
    Sure. There you go. (I've added a txt extension because otherwise it doesn't allow me to update the file).
  • argent77argent77 Member Posts: 3,474
    A quick check revealed that fpseam.glsl is identical to the patched file from a clean installation. I'll try to recreate your mod setup to see if it triggers this issue.

    In the meantime could you check if there is a second instance of this file in one of the following directories, which could override your patched file?
    • Documents/Baldur's Gate II - Enhanced Edition/Characters
    • Documents/Baldur's Gate II - Enhanced Edition/Movies
    • Documents/Baldur's Gate II - Enhanced Edition/Override
    • Documents/Baldur's Gate II - Enhanced Edition/Portraits
    • Documents/Baldur's Gate II - Enhanced Edition/Scripts
    • Documents/Baldur's Gate II - Enhanced Edition/Sounds
    • GAME/lang/xx_YY/Movies
    • GAME/lang/xx_YY/Override
    • GAME/lang/xx_YY/Sounds
    • GAME/Characters
    • GAME/Movies
    • GAME/Portraits
    • GAME/Scripts
    • GAME/Sounds
    where xx_YY is the language code of your selected game language.
  • AlonsoAlonso Member Posts: 806
    Nope, the only place where I have an fpseam.glsl is the override folder.
  • argent77argent77 Member Posts: 3,474
    I couldn't find anything wrong with the map background lighting after recreating your mod configuration. There must be something else on your system that interferes with this particular shader file.
  • AlonsoAlonso Member Posts: 806
    I reinstalled everything again and this time it worked. The only difference I'm aware of is the installation order, this time I installed the lighting pack a bit earlier. I attach the Weidu log in case it's useful.
  • AlonsoAlonso Member Posts: 806
    edited April 2019
    Now that I've managed to adjust the gamma of the background I've found a minor issue with the character markers. I describe the issue in this thread, in case you want to have a look.
  • argent77argent77 Member Posts: 3,474
    Next release of the Lightning Pack will contain a good number of additional options to change the visual appearance of the game.

    In addition to contrast, brightness and gamma there will be options to choose color temperature, which defines the "warmth" of a color. It's measured in Kelvin where higher values shift towards bluish tones and lower values shift towards reddish tones. The mod will come with a number of presets as well as an option to set color temperature manually.

    Another set of options will allow you to modify hue, saturation and lightness. Hue shifts color frequency, so that red may become green, yellow or blue. Color saturation ranges from grayscale to oversaturation. Lightness can be seen as a different approach to brighten or darken colors.

    Following are screenshots for all available (current and) new options:

    Reference screenshot: Screenshot

    Contrast, brightness and gamma:
    Color Temperature:
    Examples for Hue, Saturation and Lightness:
  • AlonsoAlonso Member Posts: 806
    Alonso wrote: »
    I have tried to modify the lighting of the map background, but it doesn't work for me. I tried several values in the fpseam.glsl file, but they don't change how the game looks
    After a lot of tinkering I think I've managed to isolate the source of this problem. Apparently it is the graphics option Nearest neighbor scaling. When I enable it this mod stops working, when I disable it, it works again.
  • argent77argent77 Member Posts: 3,474
    New release: Shader Pack v3.0

    Version 3.0 introduces options to change color temperature as well as hue, saturation and lightness. You can preview each individual setting in my previous post above or in the readme linked in the first post.

    Full changelog:
    • Added settings: Color Temperature
    • Added advanced settings: Hue/Saturation/Lightness
    • Added proper Credits and Copyright sections to the readme
    • Added German translation
    • Added PST:EE support
    • Internal restructuring
  • TulgasTulgas Member Posts: 22
    Thanks, that was totally necessary. May be can be better if used only dark tones adjustments leaving bright colors and contrasts without changes, but this is custom luminosity-curve approach which may be unavailable at all.
  • argent77argent77 Member Posts: 3,474
    New release: Shader Pack v3.1

    Changelog:
    • Added Project Infinity metadata
    • Fixed potential display issues with component names in WeiDU.log and Project Infinity
    • Fixed typos in the readme
Sign In or Register to comment.