Sampling from 3d textures doesn't seem to work

Your feedback is very important to us. We are listening.

Sampling from 3d textures doesn't seem to work

Postby Filipe Caseirito » Mon May 14, 2018 3:42 pm

Hi there,

I'm having difficulty sampling from a 3d texture...
I've made a simple shader:
- Texture Object Node with Auto-Cast Mode set to "Locked To Texture 3D"
- World Position Node
- Texture Sampler Node. The Tex input is connected to the Tex output of the Texture Object, and the UV input is connected to the XYZ output of the World Position Node.
- RGBA output of the sampler is connected to the albedo channel of the surface shader.

When I try to compile this shader, I get the error:

Unable to cast from SAMPLER3D to SAMPLER2D. You might want to use a Texture Sample node and connect it to the 'Tex' port. Generating dummy data ( 0 )

And of course the shader doesn't work... If I look in the generated code, on the Tex3d line, instead of the sampler, there's a "0" (I'm guessing the dummy data), and if I replace that for the sampler (_Texture0"), it works fine.

Looking at the code where the error message is raised and backtracking, it seems the sampler node only accepts 2d textures, which seems weird (unless there's a texture sampler node for 3d somewhere I can't find)...

I've attached the shader in case it helps, and I'm running version 1.5.3_dev01

Can you help?

Thanks
Filipe
Attachments
Test.zip
(1.2 KiB) Downloaded 230 times
Filipe Caseirito
 
Posts: 4
Joined: Mon May 14, 2018 3:33 pm

Re: Sampling from 3d textures doesn't seem to work

Postby Filipe Caseirito » Mon May 14, 2018 3:46 pm

Ah, forgot to mention, this is using Unity 2017.4.2f2

Filipe
Filipe Caseirito
 
Posts: 4
Joined: Mon May 14, 2018 3:33 pm

Re: Sampling from 3d textures doesn't seem to work

Postby Amplify_Borba » Mon May 14, 2018 5:30 pm

Hello Filipe, thank you for getting in touch and for reporting this issue.

I've just confirmed it on my side and have forwarded it to the developers for further investigation, I'll be sure to let you know as soon as we have any developments, thanks!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: Sampling from 3d textures doesn't seem to work

Postby Filipe Caseirito » Tue May 15, 2018 1:09 pm

Hi there!

Is there an ETA for this?

Best regards,
Filipe
Filipe Caseirito
 
Posts: 4
Joined: Mon May 14, 2018 3:33 pm

Re: Sampling from 3d textures doesn't seem to work

Postby Amplify_Borba » Tue May 15, 2018 1:51 pm

Hey there! The issue is still under investigation by our developers, I'll be sure to let you know as a reply to this post as soon as they have any new developments regarding it.

Apologies for any inconvenience caused!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: Sampling from 3d textures doesn't seem to work

Postby Amplify_Borba » Fri May 18, 2018 6:17 pm

Hello Filipe, thank you for your patience!

We've just release a new version, currently available for download through our website, in which we've corrected the issue you've reported.

Please let us know if you come across any further issues, thanks!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: Sampling from 3d textures doesn't seem to work

Postby Filipe Caseirito » Mon May 21, 2018 10:38 am

Hi!

It seems the problem is fixed! Thanks!

Filipe
Filipe Caseirito
 
Posts: 4
Joined: Mon May 14, 2018 3:33 pm

Re: Sampling from 3d textures doesn't seem to work

Postby Amplify_Borba » Mon May 21, 2018 11:08 am

No problem, glad to be of assistance!

Have you had the chance to rate and review Amplify Shader Editor? It would be awesome if you could share your experience with the Unity community, the Unity Asset Store thrives on user interaction and direct feedback. Every bit helps, your feedback is extremely valuable to us!

Feel free to get back in touch if you have further issues or questions, thanks!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests

cron