Giter Site home page Giter Site logo

Comments (3)

Mugen87 avatar Mugen87 commented on May 23, 2024 1

When you configure in webgl2_multiple_rendertargets the render target with a count of 3, the following WebGL warning in the console appears:

GL_INVALID_OPERATION: Active draw buffers with missing fragment shader outputs.

The issue could be fixed by making sure the object's shader writes data to the new layout(location = 2). Or by not rendering the object at all.

I'm not sure if the engine should automatically handle this use case. It seems to me the the developer instead is responsible to configure its scene correctly. So if you have objects with different shader outputs in your scene, you could

a) create multiple scenes and render them separately with different render targets.
b) use Layers or Object3D.visible and configure the objects with a respective value that you want include/exclude from rendering.

The problem is that objects with non-matching outputs are some sort of invalid input for MRT in the first place. It must be defined how objects are treated if they write e.g. no normal or velocity values and that is an application specific thing.

from three.js.

Spiri0 avatar Spiri0 commented on May 23, 2024

I use different layers. But your comment is correct because that's exactly why I introduced the layers and I use 4 of them.
According to logic there should be no conflicts.

Yesterday I worked more intensively on the readRenderTargetPixels topic. To do this, I have to familiarize myself with webgl much more intensively. I actually only deal with WebGPU

Please take the issue out so I can examine it more intensively with the layers.

I'm juggling with a little too many topics at the moment and am becoming less attentive as a result. I'm usually very thorough with my analyses. I'll slow down a bit.

from three.js.

Mugen87 avatar Mugen87 commented on May 23, 2024

Don't worry! The discussions here at GitHub are also intended to sort out one thoughts.

from three.js.

Related Issues (20)

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.