utsuboco / r3f-perf

Easily monitor your ThreeJS performances.
https://codesandbox.io/s/perlin-cubes-r3f-perf-wtp9t?file=/src/App.js
MIT License
573 stars 21 forks source link

fix: shader count when deepAnalyze is true #44

Closed davcri closed 6 months ago

davcri commented 1 year ago

Issue example: https://codesandbox.io/s/r3f-deep-analyze-issue-es4dpm?file=/src/App.js

This PR should make programs reporting more consistent when activating deepAnalyze.

I'm not entirely sure however this is a good approach since Three's gl.info.programs would still contain more programs than the one shown in r3f-perf, creating an inconsistency between the two reports.

RenaudRohlinger commented 1 year ago

The issue is a bit deeper as it seems that I was duplicating the programs for some reason to attach new informations/trackers on them IIRC. I will let this open as a reminder and check once I have more time.

Screen Shot 2023-05-02 at 12 50 19