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

program parameter current limitations #33

Closed
fabrobinet opened this issue Mar 22, 2013 · 4 comments
Closed

program parameter current limitations #33

fabrobinet opened this issue Mar 22, 2013 · 4 comments

Comments

@fabrobinet
Copy link
Contributor

Currently a parameter has types such as SAMPLER_2D , FLOAT_VEC etc...

SAMPLER_2D currently has an image property, it is too naive. we need to change this, we want to handle video too.

Some more aspects to discuss:

  • We also want to be able to declare samplers not tied to an image for offscreen rendering.
  • Additionally, how will we declare cube maps ? for the type it's easy, there is SAMPLER_CUBE. For the 6 images, let's see where they would fit...

During last discussion Remi proposed to bring back the surface concept from COLLADA.

  • it's a good place to specify width/height for offscreen rendering
  • It looks appropriate to declare the 6 images required for CUBE_MAP
  • within the surface we could have a "source" property that would be to either a uniqueID which can be an image or a video (that's close to Remi proposal too, but that wouldn't be a path directly). when the type of surface would be cube we would have a "sources" property that would take an array of 6 unique IDs. (like for image&video).
    In surface, "source" would have a different meaning than in COLLADA but I believe it wouldn't be confusing.

Also, currently parameter short-cut the indirection that COLLADA has for sampler.
And so far it looks fine this way.

I believe we should give a try at adding surface.
I'll attach soon a JSON example here.

@RemiArnaud
Copy link
Contributor

FYI - here's what cubemap defined as 6 images looks like in collada

    <newparam sid="_3246-surface">
      <semantic>Cube</semantic>
      <surface type="CUBE">
        <init_from>_3246_0</init_from>
        <init_from face="NEGATIVE_X">_3246_1</init_from>
        <init_from face="POSITIVE_Y">_3246_2</init_from>
        <init_from face="NEGATIVE_Y">_3246_3</init_from>
        <init_from face="POSITIVE_Z">_3246_4</init_from>
        <init_from face="NEGATIVE_Z">_3246_5</init_from>
        <format>R8G8B8</format>
      </surface>
    </newparam>

Also possible to define as 1 image.
Note that this is also useful to define individual files per mip-map...
(also see the format parameter, which is quite standardized even if not
fully specified in the COLLADA spec).

@pjcozzi
Copy link
Member

pjcozzi commented Apr 17, 2013

I'll attach soon a JSON example here.

If you have an example, I'm happy to provide input. Or should we expect to see this as part of your larger FX work?

@pjcozzi
Copy link
Member

pjcozzi commented Oct 22, 2013

Is this duplicate with #40?

@fabrobinet
Copy link
Contributor Author

yes it is. closing.

donmccurdy pushed a commit to donmccurdy/glTF that referenced this issue Oct 15, 2021
Formatting changes for `componentType` and `type`
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

3 participants