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

Texture properties #195

Closed
pjcozzi opened this issue Nov 26, 2013 · 9 comments
Closed

Texture properties #195

pjcozzi opened this issue Nov 26, 2013 · 9 comments

Comments

@pjcozzi
Copy link
Member

pjcozzi commented Nov 26, 2013

Currently, a glTF texture looks like

        "texture_image_0": {
            "format": 6408,
            "internalFormat": 6408,
            "sampler": "sampler_0",
            "source": "image_0",
            "target": 3553
        }
  • Do we need to include the pixel datatype, which is the second-to-last argument to texImage2D (GLenum type)?
  • When will format !== internalFormat. Do we need to include both?

CC #40

@fabrobinet
Copy link
Contributor

Good points !

  • pixel datatype , yes we should include it. But also we could default to UNSIGNED_BYTE (and thus make it optional). What do you prefer ? The reason is just to save some bytes... (provided UNSIGNED_BYTE is common enough to be a default that makes sense.
  • I am OK to not include internalFormat if it is equal to format, it just needs to be clear in the spec.

Depending on the decision here, I may have to fix the converter (and add type) or you can mark as resolved.

@pjcozzi
Copy link
Member Author

pjcozzi commented Dec 2, 2013

pixel datatype...we could default to UNSIGNED_BYTE (and thus make it optional)

Agreed. This is the default in our engine and we haven't run into any problems.

I am OK to not include internalFormat if it is equal to format, it just needs to be clear in the spec.

OK.

@fabrobinet
Copy link
Contributor

What's your expectations for the converter flag ? to have this tied to the exportDefault values option ? (which is on by default now).

@pjcozzi
Copy link
Member Author

pjcozzi commented Dec 2, 2013

Yes.

@fabrobinet
Copy link
Contributor

Works for me too. for dev-4

@fabrobinet
Copy link
Contributor

At the moment the converter just output RGBA for format and internalFormat, and UNSIGNED_BYTE for type. So it is simpler than it should be, we'll need to thing about more advanced options (in the JSON config of the converter) to provide more control.

@pjcozzi
Copy link
Member Author

pjcozzi commented Feb 24, 2014

The plan is to drop internalFormat from the spec, right? Can we update the converter for dev-6?

@fabrobinet
Copy link
Contributor

no, it was not the plan. Plan according to comments was to not have it mandatory included when it has same value as format.

@pjcozzi
Copy link
Member Author

pjcozzi commented Feb 24, 2014

Ah, right. OK.

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

2 participants