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

glTF 2.0 asset profiles and caps #829

Closed
lexaknyazev opened this issue Feb 3, 2017 · 11 comments
Closed

glTF 2.0 asset profiles and caps #829

lexaknyazev opened this issue Feb 3, 2017 · 11 comments

Comments

@lexaknyazev
Copy link
Member

With glTF 2.0 API-neutrality, we should review current signaling of expected platform capabilities.

Here're relevant parts:

{
    "asset" : {
        "version" : "2.0",
        "premultipliedAlpha" : true,
        "profile" : {
            "api" : "WebGL",
            "version" : "1.0",
        }
    },
    "glExtensionsUsed": [
        "OES_element_index_uint"
    ]
}
  1. Is premultipliedAlpha still relevant for GLSL-less materials?

  2. Can we move glExtensionsUsed to asset.profile? OES_element_index_uint makes sense for WebGL 1.0, but must be implied with possible WebGL 2.0 profile.

At the current moment, 32-bit indices support is the only major platform issue for glTF assets, since we store raw vertex and index data. Rendering such asset on a platform without 32-bit indices support will require costly CPU processing.

@javagl
Copy link
Contributor

javagl commented Feb 3, 2017

Regarding the glExtensionsUsed, a pointer to the discussion about a pull request that is strongly related to this point: #807 (comment) - it might be that this property becomes obsolete with a more generic approach.

@lexaknyazev
Copy link
Member Author

I totally agree with per-shader extension specifying when custom shaders are used, but I'm not sure how to address this issue with glTF 2.0 core.

@pjcozzi
Copy link
Member

pjcozzi commented Feb 4, 2017

@sbtron do you have any input here?

Is premultipliedAlpha still relevant for GLSL-less materials?

I think it is not required without GLSL.

Can we move glExtensionsUsed to asset.profile? OES_element_index_uint makes sense for WebGL 1.0, but must be implied with possible WebGL 2.0 profile.

OK with me.

@sbtron
Copy link
Contributor

sbtron commented Feb 4, 2017

Yes premultipliesAlpha doesn't make sense without GLSL shader. Maybe it can go along with the glsl shader extension?
Similarly with glExtensionUsed could be included in the glsl extension.
For the 32bit indices we could just say the glTF core can have a valid enum for 5125 (UNSIGNED_INT) and not require glExtensionUsed to be specified anymore.

@lexaknyazev
Copy link
Member Author

For the 32bit indices we could just say the glTF core can have a valid enum for 5125 (UNSIGNED_INT) and not require glExtensionUsed to be specified anymore.

Not all OpenGL ES 2.0 hardware support 32bit indices (e.g., ARM Mali-400). Moreover, on supported platforms such functionality must be enabled explicitly.

@lexaknyazev
Copy link
Member Author

What do you think of adopting Vulkan approach to signaling required feature set? I.e., assume WebGL 1.0 features as a universal core and require everything else explicitly.

Just example:

{
    "asset" : {
        "version" : "2.0",
        "features" : [
            "UINT_INDICES",
            "ES3_VERTEX_FORMATS"
        ]
    }
}

Vulkan manpage:
https://www.khronos.org/registry/vulkan/specs/1.0/man/html/VkPhysicalDeviceFeatures.html

@pjcozzi
Copy link
Member

pjcozzi commented Feb 5, 2017

Vulkan approach is OK with me. @sbtron likely has the best experience to say what will scale well.

@lexaknyazev
Copy link
Member Author

@pjcozzi @sbtron
Please confirm asset scheme for 2.0 (profile and premultipliedAlpha removed):

{
    "asset" : {
        "version" : "2.0",
        "generator": "collada2gttf",
        "copyright": "©2017 Khronos Group"
    }
}

@sbtron
Copy link
Contributor

sbtron commented Feb 25, 2017

yes this looks good.

lexaknyazev added a commit that referenced this issue Feb 25, 2017
@pjcozzi
Copy link
Member

pjcozzi commented Feb 25, 2017

+1

@pjcozzi
Copy link
Member

pjcozzi commented Jun 15, 2017

Updated in #826

@pjcozzi pjcozzi closed this as completed Jun 15, 2017
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