ColorCorrection.h: Typo, variable undefined

More
7 years 4 days ago - 7 years 4 days ago #1 by LordBelakor
ColorCorrection.h: Typo, variable undefined was created by LordBelakor
There seems to be a typo in the newest Reshade 0.19 code, specifically in the File ColorCorrection.h at line 327.

This is the line:
if ( Use_COLORSAT == 0 )   colorSat = 1.0f;

I tried installing a Witcher 3 preset, and got a undefined variable exception leading me to this point in the file.

I changed it to this to work:
if ( USE_COLORSAT == 0 )   colorSat = 1.0f;

The mistake is located in \ReShade 0.19.0 Public Beta with Framework\ReShade\CustomFX\ColorCorrection.h at line 327.

Next time maybe a bit more care when working with case sensitive variables ;)
Last edit: 7 years 4 days ago by LordBelakor.

Please Log in or Create an account to join the conversation.

More
7 years 4 days ago - 7 years 4 days ago #2 by crosire
Replied by crosire on topic ColorCorrection.h: Typo, variable undefined
ReShade 0.19 (injector) != ReShade Framework (shaders) ;)
I'll pass this along to Lucifer, who's managing those shaders. Thanks for reporting! =)
Last edit: 7 years 4 days ago by crosire.

Please Log in or Create an account to join the conversation.

More
7 years 4 days ago #3 by Ganossa
Replied by Ganossa on topic ColorCorrection.h: Typo, variable undefined
This is no mistake.
USE is a keyword for shader. COLORSAT is only a "boolean" variable of a shader. Therefore, the variable got intenionally renamed ( with specifically a lot of care for case sensitivity ;) )
The following user(s) said Thank You: crosire, Wicked Sick, Ioxa

Please Log in or Create an account to join the conversation.

More
7 years 4 days ago - 7 years 4 days ago #4 by LordBelakor
Replied by LordBelakor on topic ColorCorrection.h: Typo, variable undefined

This is no mistake.
USE is a keyword for shader. COLORSAT is only a "boolean" variable of a shader. Therefore, the variable got intenionally renamed ( with specifically a lot of care for case sensitivity ;) )


The mistake was writing "Use" instead of "USE". I'm no expert but considering every other similarly structured variable has uppercase "USE", and having lowercase "Use" breaks old presets, this has to be a mistake. Unless you are expecting Users to change all their old presets for only this one variable from now on. I'd say its less work just bundling this little change into the next update to ensure compatibility with old Presets.
Last edit: 7 years 4 days ago by LordBelakor.

Please Log in or Create an account to join the conversation.

More
7 years 4 days ago #5 by Ioxa

This is no mistake.
USE is a keyword for shader. COLORSAT is only a "boolean" variable of a shader. Therefore, the variable got intenionally renamed ( with specifically a lot of care for case sensitivity ;) )


The mistake was writing "Use" instead of "USE". I'm no expert but considering every other similarly structured variable has uppercase "USE", and having lowercase "Use" breaks old presets, this has to be a mistake. Unless you are expecting Users to change all their old presets for only this one variable from now on. I'd say its less work just bundling this little change into the next update to ensure compatibility with old Presets.

Like the LuciferHawk said, it was not a mistake. It needed to be changed for compatibility with the Mediator. And thats not the only one that was changed. Unfortunately it does break old presets so you will have to carry those values over manually. There may be a way to make the shaders compatible with old presets but the old presets would not be compatible with the Mediator.

Please Log in or Create an account to join the conversation.