See this example:
Reshade.fx
void VS(in uint id : SV_VertexID, out float4 position : SV_Position, out float2 texcoord : TEXCOORD)
{
texcoord.x = (id == 2) ? 2.0 : 0.0;
texcoord.y = (id == 1) ? 2.0 : 0.0;
position = float4(texcoord * float2(2.0, -2.0) + float2(-1.0, 1.0), 0.0, 1.0);
}
float4 PS(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target
{
//#include "test.fxh"
#include "test\test.fxh"
return float4(red,0,0,1);
}
technique Test < enabled = 1;>
{
pass
{
VertexShader = VS;
PixelShader = PS;
}
}
test.fx and test/test.fx
Expected behavior:
Changing red in file test.fx and reload effects afterwards in Reshade should lead to the expected color change, regardless where test.fx is located.
Actual behavior:
The color change is only applied after effect reload when test.fx is in the same folder as ReShade.fx (#include "test.fxh").
If test.fx is in a subfolder (#include "test\test.fxh"), effect reload doesn't lead to the color change. It only works after clearing the cache and then reloading.
If this is really the intended behavior, then I would like to request an option for "Clear cache on reload" and/or an extra keybinding for clearing the cache.
Otherwise it's really cumbersome (open Reshade menu, click clear cache, reload) to change values this way in some situations (like editing UIDetect.fxh in my case).