Currently, there are 0 users and 0 guests visiting this topic.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #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 control

    The 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.






    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

    and then install the june 2010 dxsdk

    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.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.


Log in with your credentials


Forgot your details?

Create Account

The Vpinball app