NokiMo
kingeric1992
kingeric1992

patreon


enbImgLoader [Dec.15.2022]

A enbseries plugin to binds shader dropdown menu to texture defined in config file.

Installation:
========================================

Config:
========================================

A bind in config file is defined by [MyTextureName/EffectName/DropdownMenuUIName] and subsequent key=value entries. The plugin supports multiple bind definitions.

The bind definition enclosed by [] has 3 params seperated by / symbol.

Param1 (MyTextureName)

is the Texture variable name as defined in .FX shaders.

Texture2D MyTextureName <---- this one
<
   string UIName = "Doesn't matter";
   string ResourceName = "dummy.bmp";
>;

Param2 (EffectName)

is the .FX filename in ALL CAPS that has the binding dropdown menu and texture. ie, ENBEFFECT.FX

Param3 (DropdownMenuUIName)

is the UIName defined for dropdown menu varialbe in .FX shader

int ExampleDropdown
   <
       string UIName="DropdownMenuUIName";  <---- this one
       string UIWidget="dropdown";
       string UIList="x1, x2, x3,x5"; <---- doesn't matters
       int UIMin=0; <---- doesn't matters
       int UIMax=3; <---- doesn't matters
   >;

Optionally, texture width, height, hasAlphaChannel attributes can be retrieve through float3 variable with binding UIName plus '_p' post-fix.

float3 ExampleDropdown_p
   <
       string UIName="DropdownMenuUIName_p"; <---- this one
       int UIHidden = 1;
   > = {0,0,0};

After binding definition, there're subsequent key=value entries to define textures and their displayed name with format DisplayName=PathToImgFile. Unicode path and most img formats are supported.

; relative path to GameDir
BW Lut = .\Data\ENB\luts\monochrome.png

; Full path
Polarizer Frame = E:\Textures\ImageFrames\polarizer.jpg

Example Config :
========================================

[MyTextureName/EffectName/DropdownMenuUIName]
First enrty = .\Data\ENB\textures\a.jpg
MyAwsomeImg = Data/ENB/textures/測試.bmp
OrFullPath  = E:\memes\b.png

[MyTextureName2/EffectName/DropdownMenuUIName2]
(same as above)

Trobuleshoot :
========================================

A enbImgLoader.log file is generated and it has details on what the plugin has read from the config file. Makes sure they're the same as the binding targets in .FX shader file.

Credits:

Boris Vorontsov for creating Enbseries and SDK support.

Updates:

[Mar.30.2023] fix ACCESS_VIOLATION.
[Dec.15.2022] fix unsafe code.
[Dec.12.2022] initial release.

enbImgLoader [Dec.15.2022]

Related Creators