(Solved) Compilation error of ReShade.fxh in DX10

  • Posts: 160
1 year 11 months ago - 1 year 11 months ago #1 by Fu-Bama


Far Cry 2 GOG version produces compilation error of ReShade.fxh and DisplayLUT.fx (avaible here github.com/Fubaxiusz/fubax-shaders/blob/...haders/DisplayLUT.fx )

LogFile:
Warning: Spoiler! [ Click to expand ]


*edit
It seems like DirectX 10 compilator has a problem, that OpenGL hasn't, with conditionals of a vector value, like
texcoord.xy > LutSize.xy ?
DirectX wants something like this:
texcoord.x > LutSize.x & texcoord.y > LutSize.y ?

*edit No.2
Problem has been fixed :cheer:
github.com/Fubaxiusz/fubax-shaders/commi...72f5e9eb6a6804172dfa

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

  • Posts: 281
1 year 11 months ago - 1 year 11 months ago #2 by brussell
Since when does Far Cry 2 work with ReShade > v0.15? I have to try it again.

edit: Nice, it seems to work again since v3.3. Never thought it would ever get fixed.
This should also work for Avatar: The Game, since it uses the same engine (Dunia).

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

  • Posts: 3740
1 year 11 months ago #3 by crosire
Comparing vectors gives you a bool vector in return. "if" only accepts scalars, so you first need to use one of the "all" or "any" intrinsics to get a scalar bool from the vector.
bool2 compare = texcoord.xy > LutSize.xy;
bool all_components_true = all(compare);
if (all_components_true) { ... }
The following user(s) said Thank You: Fu-Bama

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

  • Posts: 281
1 year 11 months ago - 1 year 11 months ago #4 by brussell
Slightly offtopic, but I'm not able to run Far Cry 2 in DX10 mode with the newest ReShade versions. I get errors in the log, which Fu-Bama doesn't:

Warning: Spoiler! [ Click to expand ]


Reshade compiles, but the game always reverts to dx9 mode. Any ideas?
(with Reshade v0.19 the dx10 mode worked when setting the ingame option to dx10 and using d3d9.dll, but now it won't anymore)

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