Currently, there are 0 users and 0 guests visiting this topic.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #202286
    CPlusPlusDev
    Participant
    @cplusplusdev

    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.

    CPlusPlusDev

     

     

    #204888
    jandegr
    Participant
    @jandegr

    Hi

    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.

    • This reply was modified 4 days, 14 hours ago by jandegr.
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

©2020 VPinBall.com

Log in with your credentials

or    

Forgot your details?

Create Account

The Vpinball app

FREE
VIEW