Comments (3)
I would like to try shared WebGL buffers (shared attributes) first. Shared Interleaved buffers would be based on it even if we would support shared interleaved buffers with different parameters.
from three.js.
I think it's nice if attribute (= WebGL buffer) can be shared among geometries. I don't really remember but like according to the codes below, currently attributes are not allowed to be shared among geometries, are they?
three.js/src/renderers/webgl/WebGLAttributes.js
Lines 130 to 144 in 07ec4e8
three.js/src/renderers/webgl/WebGLGeometries.js
Lines 9 to 36 in 39305cf
In #17089 we were thinking of shared buffers with different parameters and the change became complex. But, I haven't deeply thought yet, can't just shared attributes (so same parameters) be implemented much easier with reference counter without API change and be good start?
Perhaps I guess we don't really want to make an effort for WebGL right now because we want to spend more time for WebGPU (this is just my guess) but small changes would be acceptable?
Any thoughts on WebGL shared buffer support? @mrdoob @Mugen87 @donmccurdy I'm willing to work on it and fix this issue if it sounds good.
from three.js.
I've added some debugging output to glTF Transform, to calculate the effective "vertex count" in a few different ways:
gltf-transform inspect oval.gltf --format md
render | render-optimistic | upload | upload-optimistic |
---|---|---|---|
73,166 | 64,407 | 386,437,472 | 38,924 |
See definitions for each vertex count method. The "upload" vertex count is what we upload to the GPU today, to my understanding. And "upload-optimistic" is what could be uploaded ideally, either by attribute or by interleaved buffer.
Big difference on this model – 386,437,472 vertices if we upload attributes per-geometry (current), only 38,924 if we upload attributes individually or per by interleaved buffer. Lot of draw calls either way. :)
... can't just shared attributes (so same parameters) be implemented much easier ...
Perhaps! I'm not sure how simple this is compared to #17089, but I'm open to it. We'd need to think about what to do with interleaved buffers — both gltfpack and gltf-transform will interleave vertex data by default. I'm not sure how much binding and unbinding buffers in WebGL costs us in performance, but for models that don't reuse attributes in this way (probably more common) we don't want a performance regression there.
Naturally, I've tried optimizing the GLTF file using both gltfpack and gltf-transform. And although both of those do work, they end up taking just as much memory to do the optimization.
I'm fairly optimistic I can reduce the memory cost of optimizing this model in glTF Transform dramatically, if that helps anyone. Tracking this in donmccurdy/glTF-Transform#1315.
from three.js.
Related Issues (20)
- What is happening to the light? HOT 1
- CanvasTexture is not rerendered in VisionOS 1.1 (simulator and headset) HOT 3
- OrbitControls doesn't take effects
- Shadowmaterial goes dark when pointlight.distance is set HOT 4
- Black Environment From Cube Camera in VR HOT 13
- In version # 162, when CSS3DRenderer mounts a click event in the DOM and rotates it to a certain angle, the event cannot respond HOT 2
- EXR: lineOrder Decreasing HOT 4
- Custom Blending in WebGPU
- BatchedMesh: Add geometry groups support and multi material handling HOT 1
- Error EXR: `tiledimage`. warning: `envmap`, `tiledesc` HOT 3
- USDZExporter - Support for exporting vertex colours in USDZ format
- InstancedMesh not support SpriteMaterial HOT 2
- 3MF loader: Cannot read properties of undefined (reading 'target') HOT 10
- DepthTexture only usable when using the same renderer that produced it HOT 2
- XRManager.setFramebufferScaleFactor() does not work
- Use WEBGL_render_shared_exponent for HDR textures HOT 15
- BatchedMesh: Exception with InterleavedBufferAttribute HOT 6
- BatchedMesh: add method to check if geometry can be added HOT 5
- BatchedMesh: `bufferSubData` causes lag HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from three.js.