Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Saranit · Jan 11, 2012 at 10:37 AM · androidiosmobilevertex color

vertex panit shader support for android/ios ?

hi everyone,

i work with vertex paint(RGB) and blend by alpha channel so this is shader code that i use

 Shader "RGB Vertexcolor Blend by Vertex Alpha"
 {
     Properties 
     {
         _MainTex ("Texture 1  (vertex A  = red)", 2D) = ""
         _Texture2 ("Texture 2  (vertex A = green)", 2D) = ""
         _Texture3 ("Texture 2  (vertex A = blue)", 2D) = ""
     }
     
     SubShader 
     {
         BindChannels
         {
             Bind "vertex", vertex
             Bind "color", color
             Bind "texcoord", texcoord
         }
         Pass 
         {
             SetTexture [_MainTex]
             SetTexture [_Texture2] {combine previous lerp(primary) texture}
             SetTexture [_Texture3] {combine previous lerp(primary) texture}
         }
     }
 }

it's work well in unity but when i try to plublic on android, some object that use this shader is missing they didn't show correctly texture as i see in unity. i wonder how it's happen? or android/ios not support for vertex paint? any idea? pls help.

thk for share :)

ps. i test on android 2.3.4 with sony ericsson xperia neo-v (cpu 1g hz, ram512 single core)

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
2

Answer by SummerLynx · May 25, 2012 at 07:34 PM

Maybe it's a bit too late, but i'll try to answer for anyone there having trouble)

Try to bind texcoord for each SetTexture. Like this:

BindChannels

{

 Bind "vertex", vertex
 Bind "color", color
 Bind "texcoord", texcoord0
 Bind "texcoord", texcoord1
 Bind "texcoord", texcoord2

}

Worked for me with ICS. But with Gingerbread i'm getting trouble with that. If that does'nt work, try to split your shader in different passes.

Also, check this nice tutorial about ShaderLab: http://www.youtube.com/playlist?list=PL31F6A116DCCC9F61&feature=plcp

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Bunny83 · May 25, 2012 at 07:49 PM 0
Share

It's never too late to answer a question and this one is even from this year :D We have much older questions. This should be a knowledge database so even when the OP never comes back, it should help others with the same problem.

Unfortunately we have way much more people asking question than people answering them. So everyone with knowledge is always welcome ;)

I'm not that familiar with Android, but i guess the problem is that the hardware don't have 3 texture units so i think using 3 passes would fix it. Of course 3 passes means performance loss, but hey, it's a smartphone, not a ga$$anonymous$$g PC ;)

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Restart App on iOS and Android 0 Answers

Does receipt verification require an internet connection? 0 Answers

How to get current battery life on mobile device 3 Answers

Is this a good practice for mobile devices? 2 Answers

Asset Bundles with In-App Payment in Unity Mobile 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges