LUT Shader
- FierySwordswoman
- Topic Author
I propose having UI options for the two sizes in case someone has a LUT that happens to not be 32^3 dimensions.
"But why don't you change the values in LUT.fx to something other than 32?" You may ask...
That solution only works if all the LUT's loaded by that shader are the same exact size.
I also tried making separate LUT.fx files named LUT64.fx and LUT32.fx with the appropriate values but those had weird side effects.
Extra: If possible, a UI option to change the LUT texture source.
I tried to add the UI options myself, but as I know nothing about HLSL nor ReShade FX I ended up with 'value must be a literal expression' errors.
Please Log in or Create an account to join the conversation.
- TreppenBananenHutstaender
Please Log in or Create an account to join the conversation.
- Marty McFly
You can't edit texture sizes in GUI, you know, it's one of the thing you can't edit with uniforms.
Please Log in or Create an account to join the conversation.
- FierySwordswoman
- Topic Author
I've already fixed the issue of having multiple 'lut.png' files by having sub-directories dedicated to individual games.
So, the primary issue is I don't want to edit the main LUT.fx shader every time I need a different LUT size for something.
I tried copying the file, renaming it from LUT.fx to LUT64.fx and changing the variables from
#define fLUT_TextureName "lut.png"
#define fLUT_TileSizeXY 32
#define fLUT_TileAmount 32
#define fLUT_TextureName "lut64.png"
#define fLUT_TileSizeXY 64
#define fLUT_TileAmount 64
Please Log in or Create an account to join the conversation.
- TreppenBananenHutstaender
so you can have many lut textures in the reshade texture folder and choose one of them for the preset and the size like 4096x64
Please Log in or Create an account to join the conversation.
- Marty McFly
Please Log in or Create an account to join the conversation.
- FierySwordswoman
- Topic Author
Now I have a separate shader for my 64^3 LUT's as I wait for the 'Lightroom' shader to come out. Then I can re-making my presets using the 32^3 LUT's it generates since 64^3 is unnecessarily large.[/strike]
EDIT: Nope. Even by changing the technique name to something unique, there's still artifacts not present when editing the main LUT.fx
Banana, what Marty means by "can't edit with uniforms" is this:
Shader values in ReShade 3 need to be able to change in real-time for it to be a GUI option. If it's a value that needs the shader to be completely re-loaded (like the image size of the LUT) it can't be a GUI option for that reason.
In ReShade 2, the active effects would re-load every time you pushed a change from the Assistant UI to your game (the loading text in the upper-left would appear every time), so it was possible to edit these settings.
Please Log in or Create an account to join the conversation.
- crosire
For instance, add the following line to change the texture file name. Then hit "Reload".
fLUT_TextureName="lut2.png"
Please Log in or Create an account to join the conversation.
- FierySwordswoman
- Topic Author
"preprocessor error: redefinition of fLUT_TextureName"
Commenting-out the respective #define lines in LUT.fx fixes that, but that involves modifying the shader file, making sharing stuff a lot less easy for those who don't know what they're doing.
Please Log in or Create an account to join the conversation.
- crosire
Please Log in or Create an account to join the conversation.
- TreppenBananenHutstaender
crosire wrote: It is still possible to edit these settings, just not in real-time. On the settings tab there is a "Preprocessor definitions" field, where you can set those defines.
For instance, add the following line to change the texture file name. Then hit "Reload".fLUT_TextureName="lut2.png"
Good to know and the same is working with fLUT_TileSizeXY and fLUT_TileAmount too right? if yes what values should i put there to use a 4096x64 LUT?
Please Log in or Create an account to join the conversation.
- Sunesha
LUT
// NON-GUI LUT settings
fLUT_TextureName="lut.png"
fLUT_TileSizeXY=32
fLUT_TileAmount=32
There is more settings for other shaders in this thread:
reshade.me/forum/shader-discussion/2366-...3-0-non-gui-settings
Please Log in or Create an account to join the conversation.
- FierySwordswoman
- Topic Author
A 4096*64 LUT should consist of a lot of squares.
The square height/width (or the LUT image height) is what you put in for fLUT_TileSizeXY
The amount of squares (or the LUT's image.width/image.height) is what you put in for the fLUT_TileSizeXY
Yours is a 64^3 3D LUT, so the dimensions of each square are 64 and the amount of squares is also 64 (4096/64).
Oh, hey, that's a handy thread. Beats having to look through the .fx files.
Please Log in or Create an account to join the conversation.
- crosire
Please Log in or Create an account to join the conversation.