Shader works on OpenGL but not on DirectX
- matsilagi
- Topic Author
So , a friend did a shader for me, it works fine on OpenGL, but gives warnings (or errors if it doesn't compile) on D3D.
I suspect of the float4 origcolors on some of the passes are the ones that gives errors, but since I have no experience with HLSL, I couldn't fix it, hence why I'm asking for someone to fix it for me.
The errors it gives are:
C:\TmUnitedForever\Shader@0x222B5018(80,1): warning X4008: floating point division by zero
C:\TmUnitedForever\Shader@0x222B5018(80,73): warning X4008: floating point division by zero (Yellow if the shader compiles, red when it fails)
C:\TmUnitedForever\Shader@0x0AD7F470(83,5): error X3017: cannot implicitly convert from 'const float2' to 'float4' (Red, only happens if the TapeNoise, DirtyCRT or the VCR pass is enabled and only in D3D)
The shader code is here : pastebin.com/kz9atkUt
I don't mind the warnings but I would love to see it compile when the other passes are enabled.
Oh, also, is there a say to slow the timer? It makes parts of the shader work too fast.
Please Log in or Create an account to join the conversation.
- crosire
Please Log in or Create an account to join the conversation.
crosire wrote: Those are internal errors, after ReShade compiled the shader to HLSL code. Could you create a tracelog and post a link to it here? It contains the generated HLSL code.
Sure, imma post it later (not in a PC ATM).
Please Log in or Create an account to join the conversation.
matsilagi wrote:
crosire wrote: Those are internal errors, after ReShade compiled the shader to HLSL code. Could you create a tracelog and post a link to it here? It contains the generated HLSL code.
Sure, imma post it later (not in a PC ATM).
Here's the Tracelog: pastebin.com/HVR21LU4
Please Log in or Create an account to join the conversation.
- crosire
Please Log in or Create an account to join the conversation.
Thanks, now imma enable the rest to see if there's any other bugs.crosire wrote: Replace line 269:
with the following:Code:uv = floor(uv.xy*RFX_ScreenSize.xy/one_y)*one_y;Code:uv.xy = floor(uv.xy*RFX_ScreenSize.xy/one_y)*one_y;
Please Log in or Create an account to join the conversation.
After this one, there's just 1 more that doesn't compile.
pastebin.com/7aiW1YEe
Errors are:
B:\ReShade Framework 1.0.0\Shader@0x10298648(76,21): error X3013: 'tex2Dlod': intrinsic function does not take 2 parameters
B:\ReShade Framework 1.0.0\Shader@0x10298648(76,21): error X3013: Possible intrinsic functions are:
B:\ReShade Framework 1.0.0\Shader@0x10298648(76,21): error X3013: tex2Dlod(sampler2D, float4)
B:\ReShade Framework 1.0.0\Shader@0x10298648(74,13): warning X3206: '_NSnn': implicit truncation of vector type
Aand the last one: pastebin.com/Q2iQ1eTM
Errors are:
B:\ReShade Framework 1.0.0\Shader@0x1034A428(69,16): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
B:\ReShade Framework 1.0.0\Shader@0x1034A428(69,58): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
B:\ReShade Framework 1.0.0\Shader@0x1034A428(86,10): error X4000: variable 'color' used without having been completely initialized
B:\ReShade Framework 1.0.0\Shader@0x104B59C0(74,13): warning X3206: '_NSnn': implicit truncation of vector type
Please Log in or Create an account to join the conversation.
- crosire
Line 336 from:
Please Log in or Create an account to join the conversation.
crosire wrote: Line 462 from:
to:Code:float4 color;Code:float4 color = float4(0, 0, 0, 0);
Line 336 from:to:Code:float4 origcolor3=tex2Dlod(RFX_backbufferColor, texcoord);Code:float4 origcolor3=tex2Dlod(RFX_backbufferColor, float4(texcoord, 0, 0));
Cool, now only the VCRDistort pass needs fixes, this worked and DirtyCRT is now fixed
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.