Giter VIP home page Giter VIP logo

marching-cubes-on-the-gpu's People

Contributors

scrawk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

marching-cubes-on-the-gpu's Issues

warning X4714:

Shader warning in 'MarchingCubes': Program 'CSMain', warning X4714: sum of temp registers and indexable temp registers times 512 threads exceeds the recommended total 16384. Performance may be reduced at kernel CSMain (on vulkan).

What do i do to fix this (I don't understand this error code)

Normals are NaN Vectors

I experiment with your code. Firstly I provisionally removed perlin noise to work with simply plain or cube. I've just overwritten m_perlinNoise shader result.

float[] verts = new float[SIZE];
m_noiseBuffer.GetData(verts);

for (int z = 0; z < N; z++)
    for (int y = 0; y < N; y++)
        for (int x = 0; x < N; x++)
        {
            verts[x + y * N + z * N * N] = 1;

            if (z < 3)
                verts[x + y * N + z * N * N] = -1;
        }

m_noiseBuffer.SetData(verts);

But Igot a black plain. I've checked that all generated vertices have NaN vector normals (using your ReadBackMesh func).

I've also found a clue. This displays a color:

float[] verts = new float[SIZE];
m_noiseBuffer.GetData(verts);

for (int z = 0; z < N; z++)
    for (int y = 0; y < N; y++)
        for (int x = 0; x < N; x++)
        {
            verts[x + y * N + z * N * N] = 1;

            if (z == 3)
                verts[x + y * N + z * N * N] = 0.9f;

            if (z < 3)
                verts[x + y * N + z * N * N] = -1;
        }

m_noiseBuffer.SetData(verts);

Normals depend on deeper vertices and those have to have different values?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.