(Solved) Compilation error of ReShade.fxh in DX10

  • Fu-Bama
  • Topic Author
More
5 years 8 months ago - 5 years 8 months ago #1 by Fu-Bama (Solved) Compilation error of ReShade.fxh in DX10 was created 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!


*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
Last edit: 5 years 8 months ago by Fu-Bama.

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

  • brussell
More
5 years 8 months ago - 5 years 8 months ago #2 by brussell Replied by brussell on topic (Solved) Compilation error of ReShade.fxh in DX10
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).
Last edit: 5 years 8 months ago by brussell.

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

  • crosire
More
5 years 8 months ago #3 by crosire Replied by crosire on topic (Solved) Compilation error of ReShade.fxh in DX10
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.

  • brussell
More
5 years 8 months ago - 5 years 8 months ago #4 by brussell Replied by brussell on topic (Solved) Compilation error of ReShade.fxh in DX10
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!


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)
Last edit: 5 years 8 months ago by brussell.

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

We use cookies
We use cookies on our website. Some of them are essential for the operation of the forum. You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.