This would be an awesome addition, specially when the original mesh could be animated while only the subdivised mesh is visible
The way I understand it, you can’t do it with shader only, because WebGL does not support geometry shader.
It leaves you with doing the subdivision in JS. While it has some uses, I guess it’s less interesting (you can’t easily have it based on distance from viewpoint, you need to animate the generated points, you can’t do more than a few subdivisions…).
I have tried to translate some functions i found but no luck so far. Even just doing the subdivison did not work. Tried chatGPT too. You have some working script?
I recently ported some CGAL code to webassembly CGAL 5.5.2 - 3D Surface Subdivision Methods: User Manual,
this includes all the subdivision methods you can find. I will probably make a demo tonight or tomorrow EDT.
cheers!
Here is one example that does not render an error but does not show the subdivided mesh somehow:
I would be grateful with some working code.