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
1
Question by VivienS · Mar 29, 2011 at 01:48 PM · artifactsmacbookrealtime-shadows

Self-Shadowing problems on MacBook Pro

Hey there!

Take a look at this screenshot from Unity 3.3 Pro on Mac OSX. alt text

Almost every surface produces artifacts and moir that look like self-shadowing problems.

Fiddling with the project quality settings (shadow cascades etc.) does not remove them, adjusting the light's bias does not help and neither does changing the shaders...

The MacBook Pro, the screenshot was taken on, has an NVidia 9600M GT graphics card.

Any ideas what could cause those? It is really hard to work on the shadows on this system.

Comment
Add comment · Show 3
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 efge · Mar 29, 2011 at 04:44 PM 0
Share

Did you test your scene on other hardware? (On my old $$anonymous$$BP with an 8600$$anonymous$$ GT shadows and lights work as expected.)

avatar image VivienS · Mar 30, 2011 at 08:17 AM 0
Share

Yes, on a $$anonymous$$acPro with Bootcamp and Win-7 x64 and several other Windows 7 PCs and Laptops.. works perfectly everywhere else.

avatar image VivienS · Apr 05, 2011 at 03:52 PM 0
Share

Ok, tested it on another $$anonymous$$ac, and the problem persists

2 Replies

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

Answer by VivienS · Jul 04, 2011 at 07:56 PM

OK, I just found the problem to be an old Vertex-Lit shader... If I remove this one shader file from the project, the problems are gone. I'll try to look deeper into it if I have the time.

Thanks to all!


Edit for Joseph:

Here is the shader's code. I don't know where we got it from initially. Most likely a left-over from a previous version of the built-in shaders package Unity provides on their website, or from the community wiki. Maybe you can identify the code that caused the problem.

 Shader "VertexLit" {
 Properties {
     _Color ("Main Color", Color) = (1,1,1,1)
     _SpecColor ("Spec Color", Color) = (1,1,1,1)
     _Emission ("Emmisive Color", Color) = (0,0,0,0)
     _Shininess ("Shininess", Range (0.01, 1)) = 0.7
     _MainTex ("Base (RGB)", 2D) = "white" {}
 }
 
 SubShader {
     // Normal rendering pass
     Pass {
         Material {
             Diffuse [_Color]
             Ambient [_Color]
             Shininess [_Shininess]
             Specular [_SpecColor]
             Emission [_Emission]
         } 
         Lighting On
         SeparateSpecular On
         SetTexture [_MainTex] {
             Combine texture * primary DOUBLE, texture * primary
         } 
     }
     
     // Pass to render object as a shadow caster
     Pass {
         Name "ShadowCaster"
         Tags { "LightMode" = "ShadowCaster" }
         
         Fog {Mode Off}
         ZWrite On ZTest Less Cull Off
         //Offset [_ShadowBias], [_ShadowBiasSlope]
 
 CGPROGRAM
 #pragma vertex vert
 #pragma fragment frag
 #pragma multi_compile SHADOWS_NATIVE SHADOWS_CUBE
 #pragma fragmentoption ARB_precision_hint_fastest
 #include "UnityCG.cginc"
 
 struct v2f { 
     V2F_SHADOW_CASTER;
 };
 
 v2f vert( appdata_base v )
 {
     v2f o;
     TRANSFER_SHADOW_CASTER(o)
     return o;
 }
 
 float4 frag( v2f i ) : COLOR
 {
     SHADOW_CASTER_FRAGMENT(i)
 }
 ENDCG
 
     }
     
     // Pass to render object as a shadow collector
     Pass {
         Name "ShadowCollector"
         Tags { "LightMode" = "ShadowCollector" }
         
         Fog {Mode Off}
         ZWrite On ZTest Less
 
 CGPROGRAM
 // Upgrade NOTE: excluded shader from Xbox360; has structs without semantics (struct appdata members vertex)
 #pragma exclude_renderers xbox360
 #pragma vertex vert
 #pragma fragment frag
 #pragma fragmentoption ARB_precision_hint_fastest
 
 #define SHADOW_COLLECTOR_PASS
 #include "UnityCG.cginc"
 
 struct appdata {
     float4 vertex;
 };
 
 struct v2f {
     V2F_SHADOW_COLLECTOR;
 };
 
 v2f vert (appdata v)
 {
     v2f o;
     TRANSFER_SHADOW_COLLECTOR(o)
     return o;
 }
 
 half4 frag (v2f i) : COLOR
 {
     SHADOW_COLLECTOR_FRAGMENT(i)
 }
 ENDCG
 
     }
 }
 }


Comment
Add comment · Show 2 · 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 equalsequals · Jul 04, 2011 at 08:03 PM 0
Share

Would you be able to post the problematic shader?

avatar image VivienS · Jul 05, 2011 at 10:17 AM 1
Share

Edited the post and added the shader code

avatar image
0

Answer by taoa · Mar 30, 2011 at 02:08 PM

Try adjusting your far clip distance on your camera.

Comment
Add comment · Show 2 · 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 VivienS · Mar 31, 2011 at 11:27 AM 0
Share

Thanks! I forgot to mention this was amongst the things I already tried.. :-/ Also, it's visible in the scene view port (through the editor camera), independent of where I focus.

avatar image taoa · Mar 31, 2011 at 12:19 PM 0
Share

Then I suggest sending a bug report! ^^ Not very fancy, I know, but...

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

2 People are following this question.

avatar image avatar image

Related Questions

Graphics glitch in driving tutorial? 1 Answer

Why web player downscaled all application on macbook pro retina? 0 Answers

Does Unity run on M1 Macbook Pro? 0 Answers

Graphical artifacts from lighting 1 Answer

NGU probelm: sprite with transparency is showing triangular artifacts 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