- This topic has 1 reply, 2 voices, and was last updated 3 years, 12 months ago by jandegr.
-
AuthorPosts
-
September 26, 2020 at 7:16 am #202286
Hello developement team,
i just want to build the leatest version of this super pinball environment. I use Visual Studio Community 2019 in the latest version.In the file BasicShader.fx an error is reported:
\repos\VPinB\vpinball-code-r4298-trunk\shader\BasicShader.fx(121,27-39): error X4014: cannot have divergent gradient operations inside flow controlThe line is here:
float3x3 TBN_trafo(const float3 N, const float3 V, const float2 uv)
{
// derivatives: edge vectors for tri-pos and tri-uv
const float3 dpx = ddx(V);
const float3 dpy = ddy(V);
const float2 duvx = ddx(uv);
const float2 duvy = ddy(uv);// solve linear system
const float3 dp2perp = cross(N, dpy);
const float3 dp1perp = cross(dpx, N);
const float3 T = dp2perp * duvx.x + dp1perp * duvy.x;
const float3 B = dp2perp * duvx.y + dp1perp * duvy.y;// construct scale-invariant transformation
return float3x3(T, B, N * sqrt( max(dot(T,T), dot(B,B)) )); // inverse scale, as will be normalized anyhow later-on (to save some mul’s)
}I try to comment this line out and use a simple dp1perp to check this. After this the line bevor will report the same error.
I see in the marked lines calling ddx the result type is once float3 and once float2. I don´t find the definition of ddx. May be this is
the reaseon of the error of the compile.I have installed all workloads in VS2019 for native c++ developement. The used sdk for Windows 10 is the latest.
I am hopefully somebody can help me.
CPlusPlusDev
You need to login in order to like this post: click here
October 15, 2020 at 7:31 am #204888Hi
I had the same issue and I would also be interested in a solution, but I must say that was after retargetting it from xp to windows 10.
So for a first working build using VS2019 I installed the xp build tools as explained there
https://stackoverflow.com/questions/49516896/how-to-install-build-tools-for-v141-xp-for-vc-2017
and then install the june 2010 dxsdk https://www.microsoft.com/en-us/download/details.aspx?id=6812
fetched the code frome sourceforge with svn, otherwise you run into some trouble because it uses svn to determine the version number.
then building debug x86 worked and runs fine.
Building x64 works too but I had to copy the precompiled 64 bit dll’s from the sourcetree to the VP working folder.
You need to login in order to like this post: click here
-
AuthorPosts
Forums are currently locked.