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 rubble · Jan 26, 2012 at 06:08 PM · shaderstransparencycullingproject sharing

Shaders not working across projects?

Hi,

I'm sort of new to shaders, so forgive me if this is a stupid question, but I'm having some trouble getting a shader to work across projects.

I took one of the default shaders and just made it so that it rendered on both sides, and was not see-through (by turning the Cull off , and the ZWrite on. Here's what the code looks like:

 *Shader "Mobile/DRC_2SidedDiffuse" {
 Properties {
     _Color ("Main Color", Color) = (1,1,1,1)
     _SpecColor ("Spec Color", Color) = (1,1,1,0)
     _Emission ("Emmisive Color", Color) = (0,0,0,0)
     _Shininess ("Shininess", Range (0.1, 1)) = 0.7
     _MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
 }
 Category {
     Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
     ZWrite On
     Cull Off
     Alphatest Greater 0
     Blend SrcAlpha OneMinusSrcAlpha 
     SubShader {
         Material {
             Diffuse [_Color]
             Ambient [_Color]
             Shininess [_Shininess]
             Specular [_SpecColor]
             Emission [_Emission]    
         }
         Pass {
             ColorMaterial AmbientAndDiffuse
             Fog { Mode Off }
             Lighting Off
             SeparateSpecular On
             SetTexture [_MainTex] {
             Combine texture * primary, texture * primary
         }
         SetTexture [_MainTex] {
             constantColor [_Color]
             Combine previous * constant DOUBLE, previous * constant
         }  
         }
     } 
 }
 }*

It works fine on my computer, so I handed it off to a programmer to put it in his project. When he brings it up in his project though it's as if the shader is invisible. I've opened up this shader on his computer, and the code looks the same.

Here's what it looks like on his computer:

alt text

And here's what it looks like on my computer: alt text

Would anyone have any idea why this is happening?

Thanks in advance for any help or suggestions.

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
0

Answer by balajidream · May 09, 2012 at 08:27 AM

I am facing the same weird problem. The shader was working before. But, after i created a new project and tried to import that shader onto this new project. It doesnt work.. Help Please. And Daniel Have figured out any solution yet. THanks in advance.

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 balajidream · May 09, 2012 at 08:27 AM

I am facing the same weird problem. The shader was working before. But, after i created a new project and tried to import that shader onto this new project. It doesnt work.. Help Please. And Daniel Have figured out any solution yet. THanks in advance.

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 jogo13 · Nov 28, 2012 at 06:35 AM

I had the same problem. (on mac unity 3) I got around it by turning an object with the shader applied into a prefab, exporting it (with all dependancies) and then importing it into the target project.

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 Caspilar · Aug 07, 2013 at 04:49 PM

This might be happening because of the rendering path in your camera. Some shaders or features won't work on Vertex Lit rendering path. Perhaps the rendering paths are different on your projects. Use the same camera properties and it could be the answer you're looking for.

I had a custom shader that had a simple texture and another decal texture and was killing myself to understand why the shader "stopped working out of nothing". The problem was that I had changed the rendering path to Vertex Lit and the shader would only work on Forward.

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

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Fading objects to transparent - Apply shader with a script? 2 Answers

Transparent + affected by light shader 1 Answer

Shader that makes object transparent as light hits it 0 Answers

Don't render an Area behind a plane 0 Answers

Hiding sections of arbitrary models that lie one side of a plane 0 Answers


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