[SOLVED] OpenGL Games like Doom 3 BFG-Edition, Farming Simu
- OldLu
-
Topic Author
Less
More
8 years 8 months ago #1
by OldLu
OpenGL Games like Doom 3 BFG-Edition, Farming Simu was created by OldLu
Hello,
first of all, i would like to say thanks for the great work. It works in almost all my Games, i've tested.
But unfortunately not with OpenGL
In EVERY game, with OpenGL, i've tested, my colors are in a colorblind-like mode.
When i activate HDR, it works perfectly, but i didn't want it in all Games.
Any fix for this issue??
first of all, i would like to say thanks for the great work. It works in almost all my Games, i've tested.
But unfortunately not with OpenGL

In EVERY game, with OpenGL, i've tested, my colors are in a colorblind-like mode.
When i activate HDR, it works perfectly, but i didn't want it in all Games.
Any fix for this issue??
Please Log in or Create an account to join the conversation.
- crosire
-
Less
More
8 years 8 months ago #2
by crosire
Replied by crosire on topic OpenGL Games like Doom 3 BFG-Edition, Farming Simu
You mean the red and blue color channels are switched, right? Are you on a NVIDIA graphics card? Because there seems to be a driver bug there which causes these issues (I'm on one myself), works fine on AMD.
There is a hotfix for that particular problem (provided you're ran into the issue I think you did), it's to just switch back the two channels in the shader.
In case of MasterEffect find the "PS_Overlay" function and add "color.rgb = color.bgr;" right before "return color;".
In case of SweetFX find the "SharedWrap" function and again add that line but this time at the end of the function, before the closing "}" bracket.
There is a hotfix for that particular problem (provided you're ran into the issue I think you did), it's to just switch back the two channels in the shader.
In case of MasterEffect find the "PS_Overlay" function and add "color.rgb = color.bgr;" right before "return color;".
In case of SweetFX find the "SharedWrap" function and again add that line but this time at the end of the function, before the closing "}" bracket.
The following user(s) said Thank You: OldLu
Please Log in or Create an account to join the conversation.
- OldLu
-
Topic Author
Less
More
8 years 8 months ago - 8 years 8 months ago #3
by OldLu
Replied by OldLu on topic OpenGL Games like Doom 3 BFG-Edition, Farming Simu
Oh sorry, i forget to tell you my System:
Intel Core i7 3770
MSI B75MAP45
16GB DDR3
MSI GTX 680 TwinFrozor III
Windows 8.1 Pro
Thanks for your help, i'll try it.
Edit:
For SweetFX:
In wich file i have to add the line?
sweet.fx??
Edit2:
found it, but you have almost added the line. Did i unterstand it wrong or is it another problem?
Intel Core i7 3770
MSI B75MAP45
16GB DDR3
MSI GTX 680 TwinFrozor III
Windows 8.1 Pro
Thanks for your help, i'll try it.
Edit:
For SweetFX:
In wich file i have to add the line?
sweet.fx??
Edit2:
found it, but you have almost added the line. Did i unterstand it wrong or is it another problem?
#else
float3 color = SMAANeighborhoodBlendingPS(texcoord, offset, colorLinearSampler, blendSampler).rgb;
#if __RENDERER__ == 0x061 && __VENDOR__ == 0x10DE //if OpenGL and Nvidia
color.rgb = color.bgr;
#endif
return color;
Last edit: 8 years 8 months ago by OldLu.
Please Log in or Create an account to join the conversation.
- crosire
-
Less
More
8 years 8 months ago #4
by crosire
Replied by crosire on topic OpenGL Games like Doom 3 BFG-Edition, Farming Simu
Yes, that's the file. Right now the fix is only applied to SMAA though, there were some changes in ReShade since the shader was written. So just go down until you find "SharedWrap" and add the same code there too 

The following user(s) said Thank You: OldLu
Please Log in or Create an account to join the conversation.
- OldLu
-
Topic Author
Less
More
8 years 8 months ago - 8 years 8 months ago #5
by OldLu
Replied by OldLu on topic OpenGL Games like Doom 3 BFG-Edition, Farming Simu
I know, it's my mistake, but i can't find anything called "SharedWrap" except this (yes, i've used the search-function in notepad++
)
Lines 438-460
and if i add color.rgb = color.bgr; right before the } it doesn't work.
What am i doing wrong?
Edit:
Got it!!!!
As i've said before, it was my mistake
Big Thanks, Crosire. It works.

/*-----------------------.
| :: Shared :: |
'-----------------------*/
void SharedWrap(in float4 position : SV_Position, in float2 texcoord : TEXCOORD0, out float3 color : SV_Target)
{
color = tex2D(colorGammaSampler, texcoord).rgb;
//#if __RENDERER__ != 0x061 //if not OpenGL
//Depth buffer access
float depth = tex2D(depthSampler, texcoord).x;
if (depthtoggle)
{
// Linearize depth
const float z_near = 1.0; // camera z near
const float z_far = 100.0; // camera z far
depth = (2.0 * z_near) / ( -(z_far - z_near) * depth + (z_far + z_near) );
color.rgb = float3(depth.xxx);
}
//#endif
color = main(texcoord, color.rgbb).rgb; // Add effects. Note : RadeonPro uses main() as the entry point. Renaming it breaks RadeonPro compatibility.
//color = SweetFX_main(texcoord, color); // Add effects
}
Lines 438-460
and if i add color.rgb = color.bgr; right before the } it doesn't work.
What am i doing wrong?
Edit:
Got it!!!!
As i've said before, it was my mistake

Big Thanks, Crosire. It works.
Last edit: 8 years 8 months ago by OldLu.
Please Log in or Create an account to join the conversation.