-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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 load in @ti.func #7464
Comments
You need to pass the texture in |
Hi @bobcao3 , thanks for answering!
AttributeError: 'Texture' object has no attribute 'sample_lod' |
You would also need to pass the texture into the kernel. Taichi textures can not be captured through global varaibles |
Hey @bobcao3 thanks, do you mean
But still gets error: Traceback (most recent call last): |
Hmmmmm. That seems like a bug? Let me check |
@afiretony sorry for the late reply, this is not a bug since your This works for me:
Let us know if you have followup questions! We'll try to improve the error message here. |
Thank you @ailzhang for pointing that out! Didn't notice such an obvious mistake here hahaha. |
Hi,
I have a question related with texture load in Taichi.
In example
python/taichi/examples/rendering/simple_texture.py
, the texture object is declared out of taichi scope, and passed asti.types.texture
type to @ti.kernel function. It seemed that the texture will be converted totaichi.lang._texture.TextureSampler
object type.My question is that how can use texture method like
sample_lod
orfetch
in @ti.func?The text was updated successfully, but these errors were encountered: