Closed zeux closed 3 months ago
This PR currently uses either color or normal; implementing support for both will require copying attribute data out of source buffers, but is likely valuable - need to do more tests.
Normal effect, before / after:
Color effect, before / after (this model doesn't use textures):
Left to right: only using normals, only using colors, using normals+colors (equal weight)
The last one is still not ideal but that's probably because the underlying attribute math needs improvements. But incorporating normals is a clear win over just colors on this model.
I think I'm going to merge this as is for now and explore multi stream version separately, as it might also be valuable to do some preprocessing on data (eg linear->sRGB transform for colors for perceptual improvements or some such).
When -sv command line argument is specified, we will use vertex colors or vertex normals as part of attribute aware simplification to produce better results. For now the intention is to use a single argument to incorporate multiple different types of attributes with fixed weights, in the future we might expose more detailed control via '-sv?' prefix.
Fixes #652