11-23-2023, 09:24 PM
(11-23-2023, 02:41 AM)Lupos Wrote: While CurvyGenerator is no doubt optimized, I'm starting to think I'd either need to use the job system on multiple meshes at once on parallel, or use a compute shader.Just in case you missed it, the Curvy Generator already processes multiple meshes in parallel. More about this further in the post.
(11-23-2023, 02:41 AM)Lupos Wrote: My idea is eitherA) If your meshes are predefined, definitely bake a set of all possible deformations for each mesh.
A) lock the spline angles to only support specific angles (like 10) then build a cache dictionary for each mesh of all possible rotation types and grab from there (instead of generating new ones every frame
B) use jobs to deform the meshes in parallel
C) use a compute shader
B) I honestly don't know how much gain you can get by using the parallelization of the job system instead of the "regular" parallelization the generator already uses.
C) I am not very experienced with compute shaders. I fear that the cpu/gpu communication associated with compute shaders will nullify any benefit.
(11-23-2023, 02:41 AM)Lupos Wrote: I assume rasterizing the spline just pre-caches points in a way thats easy for generation, and generating spots pre-allocates the locations (or transform positions) to spawn stuff.The spline already have a cache (which you implicitely use by calling the "fast" API methods), no need for the curvy generator to make a cache out of the spline. The spots have more to do with modularity of the curvy generator rather than with performance.
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.