Vertex offset using Image Texture on Android

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

Vertex offset using Image Texture on Android

Postby FardinHaque » Wed Feb 21, 2018 5:58 am

Hi
I'm current making a shader where i used a grayscale Image texture to offset vertex positions. It's working fine inside unity editor but when i build the game and port it to my android device the object doesn't even show up.
If i unplug the image texture and use generated noise then it works on android. Am i missing something here? :|
FardinHaque
 
Posts: 7
Joined: Wed Feb 21, 2018 5:39 am

Re: Vertex offset using Image Texture on Android

Postby Ricardo Teixeira » Wed Feb 21, 2018 11:40 am

FardinHaque wrote:Hi
I'm current making a shader where i used a grayscale Image texture to offset vertex positions. It's working fine inside unity editor but when i build the game and port it to my android device the object doesn't even show up.
If i unplug the image texture and use generated noise then it works on android. Am i missing something here? :|


Hello,

Thank you for getting in touch, we would be happy to help.

That's an odd issue, can you share a sample shader?
What's your currently targeted OpenGL ES version and device?

Thanks!
Sales & 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
Ricardo Teixeira
 
Posts: 954
Joined: Fri Aug 09, 2013 2:26 pm

Re: Vertex offset using Image Texture on Android

Postby FardinHaque » Wed Feb 21, 2018 1:24 pm

Well i tried all day to figure out what i was doing wrong but just now i tested my shader on another device and its working perfectly there.

So here's my shader. pretty simple actually
https://drive.google.com/file/d/1V2rvpl_D5g3rH11lPH21mA7L9MzreciG/view?usp=sharing

When i was testing it on my device Symphony H300, the objects never showed up if i used Image texture to offset the vertices. Here's a screenshot on the device
https://drive.google.com/file/d/1EtSKqUKR95Ha8GWzD6XKdxQyt0T5FNTq/view?usp=sharing

But it's working on Xiaomi Redmi 4X
https://drive.google.com/file/d/1qsye-GSJSzRLJU1ZbPg8UtFdJFsWzYFi/view?usp=sharing

So, i think my device "symphony h300" is OpenGl ES 2.0 and for some reason this shader isn't supported on it. I don't know what i'm missing here as i'm pretty new to shaders. Please let me know what i'm doing wrong here :|
FardinHaque
 
Posts: 7
Joined: Wed Feb 21, 2018 5:39 am

Re: Vertex offset using Image Texture on Android

Postby Amplify_Borba » Wed Feb 21, 2018 2:41 pm

Hello, your issue might be related to limitations imposed by the chosen Shader Model, could you try compiling your shader using Shader Model 3.0 to see if the issue is still present in the build?

OpenGL ES 2.0 should support up to Shader Model 3.0, according to the Shader Compilation Target Levels reference in the Unity Manual.

Please let us know if this helps, 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: Vertex offset using Image Texture on Android

Postby FardinHaque » Wed Feb 21, 2018 3:55 pm

Changing to Shader Model 3.0 doesn't seem to fix it. What's bothering me is that, firstly the device i'm using to test this shader is not that bad. Secondly if i just simply use the Noise Generator instead of My noise texture, it works.
FardinHaque
 
Posts: 7
Joined: Wed Feb 21, 2018 5:39 am

Re: Vertex offset using Image Texture on Android

Postby Amplify_Borba » Wed Feb 21, 2018 4:10 pm

That's indeed an odd issue, would it be possible for you to send us a sample of the shader with the texture so that we may debug it on our side? 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: Vertex offset using Image Texture on Android

Postby FardinHaque » Wed Feb 21, 2018 4:23 pm

Thanks for these quick replies :)
I'v attached my shader.
If this helps, here is the specs of my device http://www.muthofon.com/symphony-h300-3969.php
Attachments
VertexOffsetShader.rar
(2.87 KiB) Downloaded 771 times
FardinHaque
 
Posts: 7
Joined: Wed Feb 21, 2018 5:39 am

Re: Vertex offset using Image Texture on Android

Postby Amplify_Borba » Wed Feb 21, 2018 5:01 pm

Thank you for taking the time to provide us with a sample, I'll pass it on to the developer and he will investigate it as soon as possible.

Meanwhile, could you also test a simple shader with only a color for the albedo and a simple offset, without using the shader function or any complex operations, on the device that's giving you the issue? 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: Vertex offset using Image Texture on Android

Postby FardinHaque » Wed Feb 21, 2018 8:00 pm

Yes it works fine on my device with just one color and vertex offset on normal direction.
here's the shader that worked:
https://photos.google.com/photo/AF1QipNgqx0GUnTuoJ3Xg3Nn8VvX-tmawwQZ7_phTDoQ
FardinHaque
 
Posts: 7
Joined: Wed Feb 21, 2018 5:39 am

Re: Vertex offset using Image Texture on Android

Postby Amplify_Borba » Thu Feb 22, 2018 10:53 am

Hello, for some reason the last link you posted is not working, could you re-upload your image, or preferably the shader itself? You can do it directly on your reply by using the "Upload Attachment", 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

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 16 guests

cron