#WebGPU, URP and GL class

1 messages · Page 1 of 1 (latest)

mighty wing
#

Will there be support for the GL low level rendering class with the URP used when WebGPU will be available in Unity 6?

cedar raptor
#

Hey @mighty wing , in the GL documentation (https://docs.unity3d.com/ScriptReference/GL.html) it recomends not using Immediate Mode drawing:
Note that in almost all cases using Graphics.RenderMesh or CommandBuffer is more efficient than using immediate mode drawing
Is there a reason you can't use Graphics.RenderMesh or CommandBuffer instead of GL?

cedar raptor
#

I checked in with our devs who had this advice for 2d shapes:

I can see why it would be convenient to use in this 2d case. But they do not actually need to create a mesh in order to use the C# drawing commands. It's a bit more involved, but they can manually set the vertex data in a graphics buffer, and draw using one of the available commands (e.g. Graphics.RenderPrimitivesIndexed, Graphics.RenderPrimitives)
They would need to test and compare, but I don't think the GL API should perform better than a command like Graphics.RenderPrimitives, even when setting vertex data every frame. It may even have a small overhead of C# side, but for some small amount of geometry it may not matter.

mighty wing
cedar raptor
mighty wing