-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Add wrapR property to Sampler and Texture3D #12701
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
Conversation
…ed third dimension wrap.
|
Thank you for the pull request, @Hiwen! ✅ We can confirm we have a CLA on file for you. |
jjhembd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Hiwen, sorry for the delayed review. This looks good overall. I re-merged main and tweaked a few JSDoc comments. Please take a look and let me know if the changes make sense.
I have one question about some additional source data types. Would it be easy enough to add those here, or do you think that should be a separate PR?
| * @property {number} width The width (in pixels) of the 3D texture source data. | ||
| * @property {number} height The height (in pixels) of the 3D texture source data. | ||
| * @property {number} depth The depth (in pixels) of the 3D texture source data. | ||
| * @property {TypedArray|DataView} arrayBufferView The source data for a 3D texture. The type of each element needs to match the pixelDatatype. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docs for texImage3D and texSubImage3D allow for these additional sources: ImageBitmap, ImageData, HTMLImageElement, HTMLCanvasElement, and HTMLVideoElement. Can we support those here? If so, we could generalize this type definition to Texture.Source and use it in Texture.js too!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using ImageBitmap, ImageData, HTMLImageElement, HTMLCanvasElement, and HTMLVideoElement as the source is a really good idea. However, I haven't actually used this yet, and I'm not sure about the specific effects. I think it would be better to open a new issue to support this.
|
This PR is somehow related to #12781 . Linking just for awareness. Further changes may not be in the scope of this PR. |
jjhembd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again @Hiwen! I'll open a separate issue to track support for the remaining input types.


Description
Add wrapR property to Sampler and Texture3D, to support the newly added third dimension wrap.
Issue number and link
#12550
Testing plan
I have improved SamplerSpec.js.
Author checklist
CONTRIBUTORS.mdCHANGES.mdwith a short summary of my change