For the sake of performance and avoiding additional if statements within tight loops there's a bit of code redundancy popping up throughout the code base, particularly with the new BVH super class #817. Some of the cases:
- Normalized vs non normalized attributes
- Indirect vs non indirect
- index vs no index
- interleaved vs non?
- Duplication of functions like "refit" for MeshBVH vs an abstracted, slower BVH version
- Duplication of computeTriangleBounds logic for MeshBVH performance
Currently we're relying on build-time generated functions to keep indirect and non-indirect code paths fast, which increases build sizes and will only get worse with more variants. Some options:
- Benchmark the performance differences between the custom MeshBVH computeTriangleBounds and the new abstract methods provided by BVH and determine whether the performance implications are acceptable.
- Use run-time code generation by basically implementing custom #define logic the way the build-time generation works.
For the sake of performance and avoiding additional if statements within tight loops there's a bit of code redundancy popping up throughout the code base, particularly with the new BVH super class #817. Some of the cases:
Currently we're relying on build-time generated functions to keep indirect and non-indirect code paths fast, which increases build sizes and will only get worse with more variants. Some options: