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

[lang] Texture support #5109

Open
11 of 18 tasks
bobcao3 opened this issue Jun 8, 2022 · 2 comments
Open
11 of 18 tasks

[lang] Texture support #5109

bobcao3 opened this issue Jun 8, 2022 · 2 comments
Labels
feature request Suggest an idea on this project

Comments

@bobcao3
Copy link
Collaborator

bobcao3 commented Jun 8, 2022

We wish to support hardware texture & image load-store. In the JIT mode (Python), we will provide a new class called Texture

You can create a texture, transfer data from a PIL image, numpy array, or NDArray (or other potential in-memory image formats), and the textures can be passed into Taichi kernels for use.

Initially we will support:

  • 2D Textures (1~4 channels)
  • Image data from NDArray
  • LOD0
  • Normalized texture formats (internal int, read out float)
  • FP16 / FP32 texture formats (internal ieee754 FP)
  • Passing textures as kernel arguments, similar to NDArrays
  • Bilinear explicit LOD sampling
  • Implicit LOD sampling with gradients (textureGrad)
  • Texel fetching (texelFetch)
  • Texel quad gathering (textureGather)

Future plans:

  • 1D / 3D Textures
  • PIL / numpy / tensor bidirectional image IO
  • LODs & LOD generation helpers
  • Sampler parameter control
  • Integer textures (Corresponds to isamplerND / usamplerND in GLSL)
  • AOT support
  • Image load-store
  • Texture array (Descriptor indexing / descriptor array, not sampler2DArray)
@k-ye
Copy link
Member

k-ye commented Jun 29, 2022

Update: 06/30

Oops, OpenGL is also supported.


Note that we are only supporting texture on Vulkan backend as a start.

@lyd405121
Copy link
Contributor

lyd405121 commented Mar 13, 2023

Will compressed format texture supported in the future?

  • Like DXT1-7(windows),pvr(powervr),etc(all platform)
  • FYI, Khronos group is working on a convertor or standard dealing with all kinds of format

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Suggest an idea on this project
Projects
Status: In Progress
Development

No branches or pull requests

3 participants