Remix.run Logo
samiv 5 days ago

Nice work,

without having looked at your particular shader code, I can only imagine the horrors and countless of hours that went into writing and debugging the shader code...

Which OpenGL and GLSL versions are you targeting?

I've been thinking about possibly prototyping integrating an SVG renderer into my game engine that would rasterize the textures from .svg files on content load. Would offer some benefits of improved packing and better scaling and resolution independence. Using an GPU based solution would offer the benefit of being able to skip the whole "rasterize on CPU then upload" dance but just rasterize directly into a texture render target in some FBO and then use the texture later on. That being said CPU based solution is definitely easier and more bullet proof ;-)

mindbrix 5 days ago | parent [-]

Thanks, you imagine correctly ;-)

The current version uses Metal. I haven't even considered GPU ports yet, as my methodology is to get it working well on one platform first.

For single-pass SVG --> texture, a CPU approach would probably offer the lowest latency. For repeat passes, the GPU would probably win.