THREE.DrawCallInspector | Visualize draw call cost

 by   Fyrestar JavaScript Version: Current License: MIT

kandi X-RAY | THREE.DrawCallInspector Summary

kandi X-RAY | THREE.DrawCallInspector Summary

THREE.DrawCallInspector is a JavaScript library. THREE.DrawCallInspector has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

This is a quick experimental attempt of a helper to monitor draw call costs. It could help spotting expensive draw calls caused by costly shaders. This is just experimental for now. I had some test runs it took some time till the expensive started to outweigh. A sort of hack is used in order to do measurements and to get as close as possible to the actual draw call without core modifications. I made this relatively quick as experiment, if it turns out to be useful and somewhat reliable i will clean it up and further improve, the WebGL API is quite limited around this as well as how precise time can be measured. Use ASDW keys to move the box, look around and you will spot a sphere in the center with a expensive shader. The output is a map that renders all objects tinted with red weight by how much time they took relative to each other. This means a average scene with equally expensive meshes in view is likely going to be mostly fully red, while if there is a more expensive objectt with an expensive shader it will be more red while the others fade towards white. There is no way to get some exact timings of a draw call, but comparing all timing weighted by the longest seems to give a reasonable result. When a render call is measured after and before every render call it is tried to wait for it being finished, the more draw calls you have the slower this process will be - in a large scene this can take several seconds. Everything is pretty driver dependent, possibly browser as well so for now i can't tell if this will work reliable in every condition. By default i recommend not using the original materials unless they are required for special vertex transformations, that means skinned meshes or similar won't be animated in the output redscale which is not relevant anyway but enough to see what is causing cost. Create the inspector, call mount in order to attach the UI and add the hooks into THREE, if you don't want to add/remove the code all time you want to inspect just only call mount when needed, such as commenting the line out or when a query parameter is given. In your render loop right at the beginning call dci.update() for the overlay output. And at your scene draw call, call dci.begin() before and dci.end() after your scene is rendered to the screen or a render target. Click on the overlay for a capture or enter a number of frames in the input, so it will automatically take a snapshot after that number of frames. This should work with all most recent 100+ revisions.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              THREE.DrawCallInspector has a low active ecosystem.
              It has 31 star(s) with 2 fork(s). There are 4 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              THREE.DrawCallInspector has no issues reported. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of THREE.DrawCallInspector is current.

            kandi-Quality Quality

              THREE.DrawCallInspector has 0 bugs and 0 code smells.

            kandi-Security Security

              THREE.DrawCallInspector has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              THREE.DrawCallInspector code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              THREE.DrawCallInspector is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              THREE.DrawCallInspector releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi has reviewed THREE.DrawCallInspector and discovered the below as its top functions. This is intended to give you an instant insight into THREE.DrawCallInspector implemented functionality, and help decide if they suit your requirements.
            • Initialize a new scene .
            • Build a one object
            • bind events cross - browser adapters
            Get all kandi verified functions for this library.

            THREE.DrawCallInspector Key Features

            No Key Features are available at this moment for THREE.DrawCallInspector.

            THREE.DrawCallInspector Examples and Code Snippets

            No Code Snippets are available at this moment for THREE.DrawCallInspector.

            Community Discussions

            No Community Discussions are available at this moment for THREE.DrawCallInspector.Refer to stack overflow page for discussions.

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install THREE.DrawCallInspector

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/Fyrestar/THREE.DrawCallInspector.git

          • CLI

            gh repo clone Fyrestar/THREE.DrawCallInspector

          • sshUrl

            git@github.com:Fyrestar/THREE.DrawCallInspector.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular JavaScript Libraries

            freeCodeCamp

            by freeCodeCamp

            vue

            by vuejs

            react

            by facebook

            bootstrap

            by twbs

            Try Top Libraries by Fyrestar

            THREE.extendMaterial

            by FyrestarJavaScript

            THREE.InfiniteGridHelper

            by FyrestarJavaScript

            THREE.BufferGeometry-toIndexed

            by FyrestarJavaScript

            cc-in-out

            by FyrestarJavaScript

            Material-Plugins

            by FyrestarJavaScript