Author Topic: [ImageEffectOpaque] Works in Editor but not in Build  (Read 639 times)

BatoZz

  • Newbie
  • *
  • Posts: 4
    • View Profile
[ImageEffectOpaque] Works in Editor but not in Build
« on: April 12, 2019, 12:38:34 PM »
Hi everyone,
I'm using Dynamic Fog & Mist Version 6.5.3 in Unity 2018.3.11f1 targeting Android Platform.
I'm trying to add a fog effect that smooth the transtion between sea and skybox. I added [ImageEffectOpaque] before OnRenderImage() method to render the effect before others transparent objects in the scene, it looks good in the editor but in the build the fog effect is being rendered above other transparent objects. There's any way to fix this?

Thanks  :)

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 5068
    • View Profile
Re: [ImageEffectOpaque] Works in Editor but not in Build
« Reply #1 on: April 12, 2019, 02:36:03 PM »
Hi,
It should work as you expected. Can you share your camera stack?
Also have you tried it in an empty project?

BatoZz

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: [ImageEffectOpaque] Works in Editor but not in Build
« Reply #2 on: April 13, 2019, 03:45:23 AM »
Hi,
I tried it in an empty project and it works good in build too, I noticed that the problem appears after importing Highligh Plus asset.
In the editor looks good the problem appears only in the build. Any way to solve this?

Thanks!!  :)
« Last Edit: April 13, 2019, 03:55:27 AM by BatoZz »

BatoZz

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: [ImageEffectOpaque] Works in Editor but not in Build
« Reply #3 on: April 17, 2019, 08:19:31 AM »
Any news? I would like to use Dynamic Fog & Mist and Highlight Plus together  :D
It seems like some shaders/scrips of Highlight Plus Asset are overriding the rendering order set by Dynamic Fog & Mist [ImageEffectOpaque]
« Last Edit: April 17, 2019, 08:29:33 AM by BatoZz »

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 5068
    • View Profile
Re: [ImageEffectOpaque] Works in Editor but not in Build
« Reply #4 on: April 17, 2019, 08:36:01 AM »
Can you send me a simple repro scene?

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 5068
    • View Profile
Re: [ImageEffectOpaque] Works in Editor but not in Build
« Reply #5 on: April 17, 2019, 09:31:49 AM »
Here's what I get (some exaggerated fog settings to notice the difference between transparent and opaque):


This is using a Meizu Note 2 device and Unity 2018.3.0f2 (both Dynamic Fog & Mist and Highlight Plus latest versions from the Asset Store).

The left cube is using Standard transparent shader while the right one is opaque. The fog is visible behind the left cube while it shows on top of the right cube (correct) while both cubes are highlighted.

If you send a screenshot or simple repro scene I'll take a look into it.
Cheers
« Last Edit: April 17, 2019, 09:38:40 AM by Kronnect »

BatoZz

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: [ImageEffectOpaque] Works in Editor but not in Build
« Reply #6 on: April 17, 2019, 02:52:54 PM »
Okay, after some tests i figured out that "Managed Stripping Level" set to "high" in player settings was causing the problem, so no problem with the plugins  :)
Thank you for you time

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 5068
    • View Profile
Re: [ImageEffectOpaque] Works in Editor but not in Build
« Reply #7 on: April 17, 2019, 03:00:29 PM »
Alright, good to know, thanks! I hope your findings help others with similar issues.