Author Topic: Shader error when building on Mac in LWRP  (Read 384 times)

Yang Shan

  • Guest
Shader error when building on Mac in LWRP
« on: May 21, 2019, 05:33:44 PM »
Hello,
I am using the Dynamic Fog with post processing on mac. When I build for mac, I get this error:


Shader error in 'DynamicFog/Image Effect PPS/Desktop Fog With Sky Haze': 'tex2D': no matching 2 parameter intrinsic function; Possible intrinsic functions are: tex2D(sampler2D, float2|half2|min10float2|min16float2) tex2D(sampler2D, float2|half2|min10float2|min16float2, float2|half2|min10float2|min16float2, float2|half2|min10float2|min16float2) at line 45 (on glcore)

Compiling Vertex program with DITHER_ON
Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR

Thanks for the help


Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 4843
    • View Profile
Re: Shader error when building on Mac in LWRP
« Reply #1 on: May 21, 2019, 11:08:29 PM »
Hi Yang,

I'm not getting that error in latest version of Dynamic Fog & Mist (tested with Unity 2019.1.2f0, LWRP and Mac).
It's possible that the version of Dynamic Fog & Mist included in Volumetric Fog & Mist is outdated. I'll check that.
Are you using Dynamic Fog & Mist included in the Volumetric Fog & Mist package or did you purchase Dynamic Fog & Mist directly from the Asset Store?
In any case please sign up on this forum so I can grant you access to the private board of the asset so you can try the latest beta version and confirm if this issue gets fixed on your end.

Regards

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 4843
    • View Profile
Re: Shader error when building on Mac in LWRP
« Reply #2 on: May 22, 2019, 02:05:02 AM »
Confirmed on Mac. It looks another bug in LWRP which doesn't allow reusing samplers. I'll report to Unity.
It's fixed as well and the update has been submitted to the Asset Store. Thanks for reporting the issue.

ivanovichdev

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Shader error when building on Mac in LWRP
« Reply #3 on: May 30, 2019, 02:20:06 AM »
Hi.

I'm having similar problem with unity 2019.1.4 and LWRP on Widows 10. I can't see any fog but when disabled the LWRP the fog shows normaly even in the demo scenes.

I have the last version of Volumetric fog.

Should I do something to make it work with the LWRP?

Regards.

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 4843
    • View Profile
Re: Shader error when building on Mac in LWRP
« Reply #4 on: May 30, 2019, 03:30:41 AM »
Hi,
Are you referring to Volumetric Fog or Dynamic Fog?
Currently only Dynamic Fog & Mist is compatible with LWRP.
Regards

ivanovichdev

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Shader error when building on Mac in LWRP
« Reply #5 on: May 30, 2019, 03:39:29 AM »
I'm using Volumetric fog.
The fog just dissapear when use the LWRP.

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 4843
    • View Profile
Re: Shader error when building on Mac in LWRP
« Reply #6 on: May 30, 2019, 03:49:56 AM »
That’s expected. Volumetric Fog & Mist is designed for the builtin pipeline.
LWRP requires whole new code. As HDRP does as well.
- Dynamic Fog & Mist was ported to LWRP first because LWRP fits better the mobile platform and Dynamic Fog & Mist is a more performant (and simpler) effect than Volumetric Fog & Mist.
- Volumetric Fog & Mist targets mainly desktop, consoles and some high end mobile devices and it uses builtin/standard architecture.
In the future we’ll have a version of Volumetric Fog & Mist compatible with other pipelines and this will be announced.

ivanovichdev

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Shader error when building on Mac in LWRP
« Reply #7 on: May 30, 2019, 04:32:21 AM »
Oh, ok ok! Got it.

Thaks for your support.