Giter Site home page Giter Site logo

Comments (5)

elalish avatar elalish commented on June 10, 2024

I'm not sure this is from MSAA - since pixelate is a post-process, I believe everything is still rendered at full resolution, then averaged down to the low-res output. So I believe this kind of super-sampled AA is just how the pixelate function works (correct me if I'm wrong). It sounds like you'd rather just render at extremely low res (which would be a lot faster anyway). This feels a bit more Three.js-level of API - can you help me understand your use case?

from model-viewer.

HawkenKing avatar HawkenKing commented on June 10, 2024

I'm not sure this is from MSAA - since pixelate is a post-process, I believe everything is still rendered at full resolution, then averaged down to the low-res output. So I believe this kind of super-sampled AA is just how the pixelate function works (correct me if I'm wrong). It sounds like you'd rather just render at extremely low res (which would be a lot faster anyway). This feels a bit more Three.js-level of API - can you help me understand your use case?

Hi,
I checked out the MSAA filter, this is set to off as default so I don't think it's from that.
The Renderer applies a base anti-alias as default I believe. This usually can be turned off with the following code in threejs:

renderer = new THREE.WebGLRenderer( { antialias: false } );

I understand that because this is part of the core renderer setup process, it's not augmentable later on in a script so the switch would need to be part of a model-viewer embed tag. If this could be set to false by the user, the noisy edge would be removed from the pixelate filter.

I hope this helps explain the use case. Many thanks.

from model-viewer.

elalish avatar elalish commented on June 10, 2024

I don't think you understood my comment. The base anti-alias the renderer applies by default is MSAA. I still believe what you're seeing is due to the pixelate function, not our anti-aliasing. Can you make a simple example using just the pixelate function from postprocessing (no MV) to show your desired behavior? I believe you'll find the same problem there.

from model-viewer.

HawkenKing avatar HawkenKing commented on June 10, 2024

I don't think you understood my comment. The base anti-alias the renderer applies by default is MSAA. I still believe what you're seeing is due to the pixelate function, not our anti-aliasing. Can you make a simple example using just the pixelate function from postprocessing (no MV) to show your desired behavior? I believe you'll find the same problem there.

Hi,
The example I posted uses the following code, the pixelate effect is the only filter active https://modelviewer.dev/examples/postprocessing/index.html:

          <example-snippet stamp-to="setup" highlight-as="html">
            <template>
<!-- Use the <effect-composer> component inside the <model-viewer> element -->
<model-viewer autoplay ar camera-controls touch-action="pan-y" src="../../shared-assets/models/Horse.glb" scale="0.01 0.01 0.01" alt="A 3D model of a horse galloping.">
  <effect-composer>
    <pixelate-effect></pixelate-effect>
  </effect-composer>
</model-viewer>
            </template>
          </example-snippet>

from model-viewer.

elalish avatar elalish commented on June 10, 2024

I'm going to close this as intended behavior - this is how the pixelate effect works, which we didn't write; it comes from another library.

from model-viewer.

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.