Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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
14
Question by flexrails · Dec 03, 2009 at 09:31 PM · shadermaterialgraphicscullingcustom-shader

double-sided plane with texture?

how do i create a double-sided plane with a transparent texture on one side, that is visible from the backside as well (mirror-inverted)?

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

4 Replies

· Add your reply
  • Sort: 
avatar image
25
Best Answer

Answer by duck · Dec 03, 2009 at 10:11 PM

There are many ways to do this:

  • Create a two sided plane mesh in your 3D editor of choice.
  • Use a two-sided shader.
  • Use two back-to-back plane primitiveas, parented to a single empty game object, and work with the parent gameobject instead.

Some of the particle shaders are two-sided, such as "Particles/Alpha Blended". This shader will use the alpha channel of the texture you provide for transparency, but you can also fade the shader in and out as a whole by adjusting the alpha value of the Tint Color. You can set the Tint Color in your scripts by using Material.SetColor.

If you want a two-sided version of one of the other built-in shaders which isn't currently two-sided, you'll need to:

  • download the Built-In Shader Source files
  • duplicate the required shader into your assets
  • set (or change) the culling value to "Off"

Then use your new custom shader in your material.

Comment
Add comment · Show 7 · 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 duck ♦♦ · Dec 03, 2009 at 10:23 PM 0
Share

actually I don't think the back to back thing wouldn't quite fit your 'mirror inverted' requirement.

avatar image flexrails · Dec 04, 2009 at 12:17 AM 0
Share

duck, thanks! how do i create a two-sided shader? how do i change transparency of the texture material at runtime? thanks, flexrails

avatar image duck ♦♦ · Dec 04, 2009 at 09:53 AM 0
Share

I've updated the answer to include the answers to these questions.

avatar image Wolfram · Aug 03, 2010 at 12:00 PM 0
Share

the back-to-back method with mirroring works, if you use a separate material with textureScale=(-1,1) and textureOffset=(1,0).

avatar image Gillissie · Apr 18, 2011 at 12:35 AM 1
Share

Duck, how exactly do you set (or change) the culling value to "Off"? I don't see the word "cull" in the shader source (for AlphaTest-Diffuse).

Show more comments
avatar image
1

Answer by golgauth 1 · May 08, 2011 at 11:17 PM

Yep, I agree with CULL Off method, but you must avoid Parallax built-in shaders if you don't want to get strange behaviour on the backside. Classical bumpmapping works good ;-)

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 username_unity_of_my · Oct 18, 2015 at 01:37 PM

You can use this package on asset store if you like.
http://u3d.as/content/mario-lelas/double-sided-standard-mobile-legacy-shaders
It maybe fit your description. Use standard double sided shader and rendering mode: transparent. It draws double sided meshes with accurate lighting in single draw call and pass.

Video:
https://youtu.be/z-u3CEfgYhY

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 ADNOC_LNG · Jun 06 at 03:58 PM

You can solve it by choosing in the Shader field: UI/Unlit/Detail

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Render back faces in deferred 1 Answer

Culling part of a sprite in Sprite Manager 2 1 Answer

Standard material shader ignoring SetFloat property "_Mode"? 1 Answer

How to write Diffuse shader with Pass{} instead of surface? 1 Answer

use RenderTexture on a sphere correctly? 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