Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better support for Vulkan #663

Closed
MarkY-LunarG opened this issue Jul 29, 2016 · 6 comments
Closed

Better support for Vulkan #663

MarkY-LunarG opened this issue Jul 29, 2016 · 6 comments

Comments

@MarkY-LunarG
Copy link

MarkY-LunarG commented Jul 29, 2016

I'm in the middle of attempting to load the GLTF models into Vulkan and I've noticed a few items. I believe these are more enhancements for a future version than a requirement for now since I can manually modify the samples to load:

  1. Support SPIR-V shaders.
    a) Should be simple for external files by just having them labeled spv or spirv.
    b) For internal mime type content, you might have to have an additional flag in the shader JSON content.
  2. Support GLSL 400 or newer
    a) uniform blocks (with defined layout, alignment and binding info in JSON)
    b) layout location definitions for input attributes (including location info in JSON)

The main issues I'm seeing, albeit I'm new to Vulkan, include properly setting up the attributes and uniforms to the GLSL shader definitions once I had to modify to use the new GLSL version. For now, I define the attributes in the JSON in the order of the GLSL usage, so I can set the location. Additionally, I do the same of the uniforms in the uniform block.

I'm attaching the changes I've made to the JSON and shader files. There might be a better way to do this, but I wanted to give you some idea of what I've done (especially in the shaders to get Glslang to compile the shaders to SPIR-V).

glTF-Vulkan.zip

I looked for a GitLab version of this in case there was a discussion on requirements for Vulkan, but I didn't see it. If there is one, let me know and I can start following it there.

@pjcozzi
Copy link
Member

pjcozzi commented Aug 10, 2016

@MarkY-LunarG thanks for the notes on using glTF with Vulkan. If you haven't already, you might want to sync-up with @chrisjebert1973 to share experiences here. It would be awesome to get a comprehensive-ish wishlist based on your combined experiments with glTF and Vulkan.

@GunpowderGuy
Copy link

GunpowderGuy commented Dec 23, 2016

what about the way the geometry is represented ? glTF was designed to mimic opengl , so wouldnt using it with vulkan requiere additional parsing , which would slow down loading time and negate this format main strength ?

@MarkY-LunarG
Copy link
Author

I believe with the AMD Vulkan viewport transform extension, that should be negated. But I haven't delved to deeply into that.

@GunpowderGuy
Copy link

But that extension wont be necesary for the version 1.1 because would have already adressed the problem , right?

1 similar comment
@GunpowderGuy
Copy link

But that extension wont be necesary for the version 1.1 because would have already adressed the problem , right?

@emackey
Copy link
Member

emackey commented Sep 19, 2018

glTF 2.0 is cross-platform, and Vulkan renderers for it exist. If any trouble spots between glTF 2.0 and Vulkan are still around, please open a new issue for them, thanks.

@emackey emackey closed this as completed Sep 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants