Welcome, Guest.
Username: Password: Remember me

TOPIC: [SOLVED] OpenGL Games like Doom 3 BFG-Edition, Farming Simu

OpenGL Games like Doom 3 BFG-Edition, Farming Simu 1 year 11 months ago #1

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??
The administrator has disabled public write access.

OpenGL Games like Doom 3 BFG-Edition, Farming Simu 1 year 11 months ago #2

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2452
  • Thank you received: 1391
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.
Cheers, crosire =)
The administrator has disabled public write access.
The following user(s) said Thank You: OldLu

OpenGL Games like Doom 3 BFG-Edition, Farming Simu 1 year 11 months ago #3

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?
#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: 1 year 11 months ago by OldLu.
The administrator has disabled public write access.

OpenGL Games like Doom 3 BFG-Edition, Farming Simu 1 year 11 months ago #4

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2452
  • Thank you received: 1391
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 =)
Cheers, crosire =)
The administrator has disabled public write access.
The following user(s) said Thank You: OldLu

OpenGL Games like Doom 3 BFG-Edition, Farming Simu 1 year 11 months ago #5

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++ =))
/*-----------------------.
  | ::      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: 1 year 11 months ago by OldLu.
The administrator has disabled public write access.