Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

New Premium Module: Tyrants of the Moonsea! Read More
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

[MOD] Lighting Pack for the Enhanced Edition

argent77argent77 Member Posts: 2,787
edited September 1 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 (SHS)

Download (GitHub)

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
JuliusBorisovGrammarsaladelminsterartificial_sunlighthook71CrevsDaakbrusRavenslightAlonsoGoida

Comments

  • agrisagris Member Posts: 571
    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: 2,787
    @agris‌ Yep, that's definitely a bug. It'll be fixed in the next release.

  • argent77argent77 Member Posts: 2,787
    @agris‌ Bug has been fixed.

    New version 2.1 of the Shader Pack can be downloaded from the link in the first post.

    JuliusBorisovagrisCrevsDaak
  • argent77argent77 Member Posts: 2,787
    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).

    JuliusBorisovCrevsDaak
  • argent77argent77 Member Posts: 2,787
    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: 571
    @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: 2,787
    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: 2,787
    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

    agrisRavenslightGrammarsaladAedan
  • mashedtatersmashedtaters Member Posts: 2,176
    Just wanted to say I love this mod.

    Grammarsalad
  • AlonsoAlonso Member Posts: 745
    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: 2,787
    edited February 12
    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.

    Alonso
  • AlonsoAlonso Member Posts: 745
    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: 2,787
    edited March 15
    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.

    Alonso
  • AlonsoAlonso Member Posts: 745
    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 18
    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: 2,787
    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: 2,787
    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.

    hook71RaduzielGusindacoffin_nailer
  • AlonsoAlonso Member Posts: 745
    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: 2,787
    Can you post your WeiDU.log (in spoiler tags or as attachment)? Attaching the patched fpseam.glsl would also be helpful.

  • AlonsoAlonso Member Posts: 745
    Sure. There you go. (I've added a txt extension because otherwise it doesn't allow me to update the file).

  • argent77argent77 Member Posts: 2,787
    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: 745
    Nope, the only place where I have an fpseam.glsl is the override folder.

  • argent77argent77 Member Posts: 2,787
    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.

    Alonso
  • AlonsoAlonso Member Posts: 745
    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: 745
    edited April 8
    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: 2,787
    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:

    AlonsoGusinda
  • AlonsoAlonso Member Posts: 745
    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.

    Gusinda
  • argent77argent77 Member Posts: 2,787
    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

    Gusinda
Sign In or Register to comment.