Giter VIP home page Giter VIP logo

Comments (2)

domme avatar domme commented on June 23, 2024

Hi!
This warning comes from the geometry shader that handles voxelization (voxelizeGeom.shader). In the most recent version, we fixed that issue by moving some matrix- and vector- calculations out of the shader to the CPU which are then passed to the shader as Uniforms. (Basically, we moved everything in the "init()"-function to the CPU).
I recommend to check out the latest versions of the project from this git-repo (and also the latest KoRE-version from my repo). To compile, you have to copy your "ext"-folder from your current project directory. And you should also copy the two .dlls in the "bin" folder in order to get it running ;)

We'll also provide the ext-folder as separate download soon.

To your other question: There are some debugging tools for GPU programming. Unfortunately, most of them crash when you use brand-new OpenGL functions (like we do). If you want to try it anyway, check out "AMD CodeXL" or "NVIDIA Parallel Nsight".

from voxelconetracing.

Libaier avatar Libaier commented on June 23, 2024

Thank you for answering my questions!

Well I have got a better result by check out your latest code.
When I load the scene "monkey.dae"
I can got the right result.
Well I changed the code to load the scene "sibenik.dae".
It crashed.
I debugged the program and found when the program came into the function

_backbufferStage->addProgramPass(new VoxelizePass(params.voxel_grid_sidelengths, &_vctScene, kore::EXECUTE_ONCE));

and run this code

    for (uint i = 0; i < vRenderNdoes.size(); ++i) {
        NodePass* nodePass = new NodePass(vRenderNdoes[i]);
        this->addNodePass(nodePass);


        MeshComponent* meshComp =
            static_cast<MeshComponent*>(vRenderNdoes[i]->getComponent(COMPONENT_MESH));

        nodePass
            ->addOperation(OperationFactory::create(OP_BINDATTRIBUTE, "v_position",
            meshComp, "v_position",
            voxelizeShader));
        nodePass
            ->addOperation(OperationFactory::create(OP_BINDATTRIBUTE, "v_normal",
            meshComp, "v_normal",
            voxelizeShader));
        nodePass
            ->addOperation(OperationFactory::create(OP_BINDATTRIBUTE, "v_uv0",
            meshComp, "v_uvw", voxelizeShader));
        nodePass
            ->addOperation(OperationFactory::create(OP_BINDUNIFORM, "model Matrix",
            vRenderNdoes[i]->getTransform(),
            "modelWorld",
            voxelizeShader));
        nodePass
            ->addOperation(OperationFactory::create(OP_BINDUNIFORM, "normal Matrix",
            vRenderNdoes[i]->getTransform(),
            "modelWorldNormal",
            voxelizeShader));

        const TexturesComponent* texComp =
            static_cast<TexturesComponent*>(
            vRenderNdoes[i]->getComponent(COMPONENT_TEXTURES));

        const Texture* tex = texComp->getTexture(0);

        nodePass
                ->addOperation(OperationFactory::create(OP_BINDTEXTURE, tex->getName(),
                texComp, "diffuseTex", voxelizeShader));
        nodePass
            ->addOperation(new RenderMesh(meshComp));
    }

when the parameter "i">=9
the parameter "texComp" was NULL,so it crashed.
I changed the code like this

    if(NULL!=texComp){
        const Texture* tex = texComp->getTexture(0);
        nodePass
            ->addOperation(OperationFactory::create(OP_BINDTEXTURE, tex->getName(),
            texComp, "diffuseTex", voxelizeShader));
    }

The program didn't crash but I got the massage "Dislay driver stopped responding and has recovered" from windows taskbar.
Have you ever got the same problem on your computer?Do you have an idea to solve the problem?

Greetings!
Libaier from China.

from voxelconetracing.

Related Issues (5)

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.