Skip to content
This repository was archived by the owner on Jun 14, 2023. It is now read-only.

Conversation

@vojtatom
Copy link
Member

@vojtatom vojtatom commented Oct 12, 2022

Several optimizations:

  • store colors as Uint8Array and normalize to floats,
  • same as above for ids,
  • precompute dot product of normals and single directional light and pass the result as dot to shaders where applicable,
  • optimize assemblers to assemble metadata and id buffers only when explicitly requested.

As of b907925:

  • 785 MB of resources downloaded
  • memory utilized by three.js: reduced from 1475 MB to 732 MB.

@vojtatom vojtatom merged commit e215fd1 into dev Oct 14, 2022
@vojtatom vojtatom deleted the opt branch October 14, 2022 16:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants