Skip to content

[Proposal] Enabling extra OpenGL extensions at startup. (specifically mesh shading and SPIR-V) #4

@Kuba663

Description

@Kuba663

What

OpenGL allows Mesh Shaders in 4.6 and since LWJGL seems to support them1. It seems to be the same for SPIR-V2. I propose adding an optional per-compatible device support for those features.

Why

Using task/amplification shaders to cull meshlets which are then sent to mesh shaders is faster (and easier) than generating real geometry from virtual geometry in compute shaders and SPIR-V is a binary format which makes it faster to link shader programs, which will improve loading times.
Additinally, the new mesh pipeline could help speed up lighting calculations.

How

GL.getCapabilities(), then using different implementations of rendering systems.

Potential problems

  • Increased development time, hence this should have lower priority.
  • It will require us to rewrite the entire rendering pipeline since Mesh and Vertex shaders don't seem to lik eeachother very much.
  • Modders might just straight up ignore it or force SPIR-V onto their mods, which would cause a deluge of mods with compatibility issues since the extensions are rather new and OpenGL and Metal don't like eachother.
  • ARR binary shader pack collision hell.

What I am not proposing

Making Kirino NVidia exclusive
Forcing SPIR-V

Extras

Rewriting vanilla mob model classes (ModelBiped etc.) to use the new pipeline. Meshlet generation will be easier since there is no non-convex geometry in those, as they are made of cubes.

References

  1. https://javadoc.lwjgl.org/org/lwjgl/opengl/EXTMeshShader.html
  2. https://github.com/LWJGL/lwjgl3/blob/a73648fbfcbc0945e9a0ffa2a3dca021c372f3b2/modules/lwjgl/opengl/src/generated/java/org/lwjgl/opengl/GL41.java#L92

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions