Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 Rajasekhar · Feb 24, 2010 at 09:32 AM · iphonereflection

reflection for iphone

i am applying a cubemap, reflection is not affected for object(cars..).

please help, how to follow the procedure .

by

Comment
Add comment · Show 2
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 Motionreactor · Feb 24, 2010 at 09:55 AM 0
Share

Reflaction is a truly new thing to me. I suspect you meant 'Reflection' rather than 'Refraction'. Although I guess you could call the combination 'Reflaction'.

avatar image Mike 3 · Jul 26, 2010 at 12:45 PM 0
Share

Edited it to reflection for the sake of my sanity

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by yourserb · Apr 19, 2010 at 05:53 AM

Hi,

Try this Shader for reflection ,but in iphone i think we cant get real time reflection, u can use this shader get the reflection image from Max or Maya.

Shader "iPhone/lightmap/reflective" { Properties { _Color ("Main Color", Color) = (1,1,1,1) _MainTex ("Base (RGB)", 2D) = "white" {} _LightMap ("Lightmap (RGB)", 2D) = "white" { LightmapMode } _Reflect ("Reflection", 2D) = "black" { TexGen SphereMap } }

 SubShader
 {
     Pass
     {
         Name "BASE" 

         BindChannels {
             Bind "Vertex", vertex
             Bind "texcoord1", texcoord0 // lightmap uses 2nd uv
             Bind "texcoord", texcoord1 // main uses 1st uv
         }
         SetTexture [_LightMap] {
             combine texture
         }
         SetTexture [_MainTex] {
             combine texture * previous
         }
     }

     /* This pass uses vertex information to control Reflection
     Pass
     {
         Name "REFLECT"
         ZWrite Off
         Blend SrcAlpha OneMinusSrcAlpha
         ColorMaterial AmbientAndDiffuse
         Lighting Off

         BindChannels {
             Bind "Vertex", vertex
             Bind "normal", normal
         }

         SetTexture [_Reflect] {
             combine texture, primary
         }
     }*/

     // Use this pass, if you want to fetch alpha from main texture instead
     Pass
     {
         Name "REFLECT"
         ZWrite Off
         Blend SrcAlpha OneMinusSrcAlpha

         BindChannels {
             Bind "Vertex", vertex
             Bind "normal", normal
             Bind "texcoord", texcoord0 // main uses 1st uv
         }

         SetTexture [_MainTex] {
             combine texture
         }
         SetTexture [_Reflect] {
             combine texture, previous
         }
     }

 }

}

Comment
Add comment · 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
0

Answer by donzen · Mar 14, 2012 at 12:22 PM

How is possibile to change the shader to works with Beast lightmapper?

Comment
Add comment · 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

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

1 Person is following this question.

avatar image

Related Questions

Top down light map as a environment map for the main character/Player? 0 Answers

Iphone Shader Reflection Map 0 Answers

Reflection property 1 Answer

Reflections in iphone 2 Answers

Serialization reflection ExecutionEngineException on iPhone 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