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 /
This question was closed Jun 02, 2018 at 02:18 AM by xrguajardo for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by xrguajardo · Jun 01, 2018 at 06:48 AM · shadersshadowsspriterenderer

Shadows looks different in editor than in build

I have run through a lot of posts yesterday in order to achieve real time shadows with Sprites, using the sprite renderer and a modified version of the Diffuse shader that is built in inside unity and it looks nice in the editor and game window but whenever I make a build the shadows looks ugly:

alt text

Does anyone have an idea why this could be happening?

the build is running in fantastic...

capture.png (42.8 kB)
Comment
Add comment · Show 4
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 NoDumbQuestion · Jun 01, 2018 at 07:39 AM 0
Share

you are using custom shader ==> Shader have target render platform . Your build platform is not support the shader. Like old Android not support shader using OpenGL 3.0. Or Android not support shader using DX 9.

Check if your shader have the right target build

avatar image xrguajardo · Jun 01, 2018 at 08:48 PM 0
Share

Hi @NoDumbQuestion

I have downloaded the Built-In Shaders of Unity and I have modified the "Sprite-Diffuse"

I have modified the last line: original: Fallback "Transparent/VertexLit" change: Fallback "Transparent/Cutout/VertexLit"

and I have modified the property "Cast Shadows" that is hidden in the inspector on the sprite renderer, my build platform is PC

avatar image b1gry4n · Jun 02, 2018 at 01:42 AM 0
Share

not really an answer, but a possible alternative... wouldnt it be easier to duplicate your character, make his material grey/transparent, and feed the same animations in? if your shadow is always going to be on a flat background, this would work. if youre casting shadows over 3d geometry or more complex situations, it wouldnt work.

avatar image xrguajardo · Jun 02, 2018 at 02:21 AM 0
Share

@b1gry4n - thanks for your reply, I wanted to have more realistic shadows because the geometry will not be flat, that scenario was only for testing purposes, I have achieved the desired effect by modifying the Standard Shader of Unity, the solution seems to work fine except for unity 5.6

1 Reply

  • Sort: 
avatar image
0
Best Answer

Answer by xrguajardo · Jun 02, 2018 at 02:18 AM

Modified the standard shader , added the subshader of the Sprite-Diffuse at the very beginning and now it's working fine, it's also required to change the render queue to 3000

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

Follow this Question

Answers Answers and Comments

95 People are following this question.

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

Related Questions

Transparent sprite color change shader 0 Answers

,[Unity 2D] Spine skeleton sprite outline effect 0 Answers

Strange shadow/texture issue on Save Scene 0 Answers

Interacting a facing glow with light 1 Answer

Doom Classic Effect - Realtime Pixelated Shadows 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