URP, issue with pragma multi_compile FOG declarations in shader

Hi,

I have made an image effect using the forward renderer features and in the shader i use

#pragma multi_compile FOG_LINEAR FOG_EXP FOG_EXP2

This causes the shader to be declared as not supported when build for PC (DirectX 11) and appear black.

"
WARNING: Shader Unsupported: ‘Unlit/shader_FORWARD_URP’ - All passes removed
WARNING: Shader Did you use #pragma only_renderers and omit this platform?
ERROR: Shader Shader is not supported on this GPU (none of subshaders/fallbacks are suitable)WARNING: Shader Unsupported: ‘Unlit/shader_FORWARD_URP’ - Setting to default shader."

Is this a know issue or perhaps i do this wrong way ?

Thanks in advance for any insight on this matter

I use Unity 2019.3.7f1 with latest URP version

Not sure why that is, but why did you pragma like that instead of #pragma multi_compile_fog ?

1 Like

That is a good qeustion, i just took this shader from the Lit in URP and combined it with some older of my own, so perhaps this was a left over or previous URP - LWRP version