Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Glow-y' effect on some materials after color transition #6

Open
afauch opened this issue Apr 12, 2018 · 4 comments
Open

'Glow-y' effect on some materials after color transition #6

afauch opened this issue Apr 12, 2018 · 4 comments

Comments

@afauch
Copy link
Owner

afauch commented Apr 12, 2018

Found by @rckmnt

Using method
gameObject.SetColor("#FF0000", 0.8f);

ezgif-3-496f246802

Material Before Transition
before

Material After Transition
after

@afauch
Copy link
Owner Author

afauch commented Apr 12, 2018

A couple of things I'm noticing @rckmnt

  • The key thing contributing to this 'glow-y' effect seems to be the fact that the different faces of the cube are not shaded according to light. In the GIF this lack of shading appears to be true on all of the red material instances after transition, though the camera perspective makes it hard to be 100% sure.
  • I'm noticing that the yellow cube in particular doesn't seem to be shaded by side prior to transition. This makes me wonder whether there are some lighting settings at play here.
  • I'm noting that the object is still casting shadows, which means it's probably still interacting with light buffers in some way.
  • The only difference in materials I could see between your example and my example below is that you don't have Specular Highlights or Reflections checked on your Forward Rendering Options. I'm curious whether checking those would have any effect.

My attempt to repro (no glow-y issue)
ezgif-3-03ecd4270a
Before
screen shot 2018-04-11 at 9 29 48 pm
After
screen shot 2018-04-11 at 9 30 08 pm

Some shots in the dark:

Hypothesis 1
This has to do with your project-level lighting / quality settings (Edit > Project Settings > Quality). Maybe shading the "Fade" render mode isn't being respected by the quality settings under your current build target platform.

Hypothesis 2
This issue has to do with Forward/Deferred Rendering, and the differences are caused when a material is swapped from "Opaque" to "Fade" rendering mode without Forward Rendering turned on. I don't know much about this - just started reading about it here. What you're seeing seems similar to what happens when Color Buffer is active without including Depth Buffer and Normal Buffer.
buffers

@afauch
Copy link
Owner Author

afauch commented Apr 12, 2018

@afauch
Copy link
Owner Author

afauch commented Apr 12, 2018

Related, but not a solution: Unity docs on Transparent vs Fade render modes
https://docs.unity3d.com/Manual/StandardShaderMaterialParameterRenderingMode.html

@afauch
Copy link
Owner Author

afauch commented Apr 12, 2018

Logging my attempts to repro:

  • Turning off Specular Highlights and Reflections did not repro.
  • Changing Smoothness=0 did not repro.
  • Removing Skybox did not repro.
  • Changing Quality Settings to Very Low did not repro.

Hypothesis 1 disproved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant