Code Monkey home page Code Monkey logo

Comments (6)

mrdoob avatar mrdoob commented on May 5, 2024

Are we talking CanvasRenderer or WebGLRenderer here?

Both have back-face culling already. Depends of your scene and what the user is supposed to see. But yes, it's always good to remove faces that will never be seen (less computations), it's like having code that does nothing.

from three.js.

 avatar commented on May 5, 2024

I currently use WebGLRenderer.

That they both already have backface-culling is great!

I then however wonder why you (here 52ef987) did remove the bottom faces of the cubes in the Minecraft demo. These faces are always backfaces, so they are already culled, right?

As for the culling of invisible faces, it save computations for the GPU, but it takes extra computations for the CPU every time the camera moves (because then, it should be recalculated what is visible and what is not...). There is a trade-off, I guess?

from three.js.

mrdoob avatar mrdoob commented on May 5, 2024

That was alteredq though... Anyway, it's not that we're -removing- the bottom sides of the cube. It's that we're -not adding- them. Kinda different ;)

Backface culling is useful for faces that may be seen at some point. Like the back of the Walt Disney head which you would be seeing. But, in theory, the bottom of the minecraft cubes shouldn't ever be seen, so you can -not add- them to save memory and CPU/GPU computations.

from three.js.

 avatar commented on May 5, 2024

Ah, I see... Should have thought about that myself :-)

Thanks for the explanation!

How can I contribute back to the project and to you? Is there anything you would like?

from three.js.

mrdoob avatar mrdoob commented on May 5, 2024

You can contribute back by doing amazing stuff with it ;)

from three.js.

 avatar commented on May 5, 2024

Will do ;-)

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.