Revision: 06.08.2023, https://compute.toys/view/407
fn sdSphere(p: vec3f, r: f32) -> f32 {
return length(p) - r;
}
Revision: 06.08.2023, https://compute.toys/view/407
fn sdSphere(p: vec3f, r: f32) -> f32 {
return length(p) - r;
}
This optimizes a GLTF file that was exported by blender (or similar) by de-duplicating buffer views (i.e. chunks of bytes) that are equal and removing redundant accessors.
For example, 100 cubes of different scales/materials/rotations/etc should all end up using a single BufferGeometry in ThreeJS, which isn't the case with current GLTF exporters in Blender and parsers for ThreeJS.
In scenes with a lot of instancing, it can dramatically reduce total file size as well as render performance. In one test scene:
Before: 4.8MB file size, 832 THREE.Geometry
instances across 832 THREE.Mesh
objects
After: 661KB file size, 13 THREE.Geometry
instances across 832 THREE.Mesh
objects
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY | |
;by doppelganger ([email protected]) | |
;This file is provided for your own use as-is. It will require the character rom data | |
;and an iNES file header to get it to work. | |
;There are so many people I have to thank for this, that taking all the credit for | |
;myself would be an unforgivable act of arrogance. Without their help this would | |
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into | |
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no |