Dustyroom / flat-kit-doc

Documentation of the Flat Kit asset.
https://flatkit.dustyroom.com
Apache License 2.0
2 stars 1 forks source link

URP Stylized Surface Shaders Error #64

Closed Blayder1990 closed 2 years ago

Blayder1990 commented 2 years ago

Describe the bug i want to use URP instead of the build in Render Pipeline in Unity. But i get always some Errors in the Console.

Shader error in 'FlatKit/Stylized Surface': Invalid conditional expression: unexpected ','. at line 138

Compiling Fragment program with _TEXTUREBLENDINGMODE_MULTIPLY 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_RGBM_ENCODING Disabled keywords: _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS _ADDITIONAL_LIGHT_SHADOWS _SHADOWS_SOFT LIGHTMAP_SHADOW_MIXING SHADOWS_SHADOWMASK _SCREEN_SPACE_OCCLUSION DIRLIGHTMAP_COMBINED LIGHTMAP_ON DOTS_INSTANCING_ON FOG_LINEAR FOG_EXP FOG_EXP2 INSTANCING_ON _CELPRIMARYMODE_SINGLE _CELPRIMARYMODE_STEPS _CELPRIMARYMODE_CURVE DR_CEL_EXTRA_ON DR_GRADIENT_ON DR_SPECULAR_ON DR_RIM_ON DR_VERTEX_COLORS_ON DR_ENABLE_LIGHTMAP_DIR _UNITYSHADOWMODE_MULTIPLY _UNITYSHADOWMODE_COLOR _TEXTUREBLENDINGMODE_ADD _UNITYSHADOW_OCCLUSION _ALPHATEST_ON _ALPHAPREMULTIPLY_ON _NORMALMAP _EMISSION _RECEIVE_SHADOWS_OFF UNITY_NO_DXT5nm UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_VIRTUAL_TEXTURING UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_ASTC_NORMALMAP_ENCODING SHADER_API_GLES30

===================================== and

Shader error in 'FlatKit/Stylized Surface': Invalid conditional expression: unexpected ','. at line 340

Compiling Vertex program 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_RGBM_ENCODING Disabled keywords: _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MIXED_LIGHTING_SUBTRACTIVE DIRLIGHTMAP_COMBINED LIGHTMAP_ON DOTS_INSTANCING_ON INSTANCING_ON _NORMALMAP _RECEIVE_SHADOWS_OFF UNITY_NO_DXT5nm UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_VIRTUAL_TEXTURING UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_ASTC_NORMALMAP_ENCODING SHADER_API_GLES30

/////////////////////////

if i use the build in Render Pipline anything works fine! if i switch to URP the shader 'FlatKit/Stylized Surface is missing! Can you help me?

Expected behavior that it works fine :)

Screenshots If applicable, add screenshots to help error explain your problem.

Unity details: Flat Kit version 2.7.0 Unity 2020.2.2f1 Dev platform: WindowsEditor Target platform: StandaloneWindows URP installed: True, version 10.2.2 Render pipeline: UniversalPipeline,LightweightPipeline Color space: Linear Quality config: [FlatKit] Example Settings URP Graphics config: [FlatKit] Example Settings URP

Additional context Add any other context about the problem here.

dustyroom-studio commented 2 years ago

Hi, thanks for the details. You seem to be using a too old version of Unity, which is incompatible with Flat Kit. The oldest compatible version is 2020.3.24f1 You can find this info on the Asset Store page, under the Render pipeline compatibility paragraph.

flat-kit-asset-store-rp-compatibility-chart_1

Could you please update the Unity version to the one that meets the requirements? Let me know if the issue persists.

dustyroom-studio commented 2 years ago

It seems the issue is with the line #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Version.hlsl" in our shader. That line references a file in URP. Can unable to upgrade your project to Unity 2020.3, please try re-importing URP and then right-click the Flat Kit folder in the Project tab and click Reimport.

Blayder1990 commented 2 years ago

Hi, thanks for the details. You seem to be using a too old version of Unity, which is incompatible with Flat Kit. The oldest compatible version is 2020.3.24f1 You can find this info on the Asset Store page, under the Render pipeline compatibility paragraph.

flat-kit-asset-store-rp-compatibility-chart_1

Could you please update the Unity version to the one that meets the requirements? Let me know if the issue persists.

Thank you, your right

Blayder1990 commented 2 years ago

Thx