Dustyroom / flat-kit-doc

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

Shader error in 'FlatKit/Stylized Surface': undeclared identifier 'GetMeshRenderingLightLayer' #104

Closed adrwalker closed 1 year ago

adrwalker commented 1 year ago

Describe the bug I see this error after upgrading Unity from LTS 2021 to LTS 2022:

Shader error in 'FlatKit/Stylized Surface': undeclared identifier 'GetMeshRenderingLightLayer' at Assets/3rdParty/FlatKit/Shaders/StylizedSurface/LibraryUrp/Lighting_DR.hlsl(136) (on d3d11)

Compiling Subshader: 0, Pass: ForwardLit, Vertex program with _TEXTUREBLENDINGMODE_MULTIPLY
Platform defines: SHADER_API_MOBILE UNITY_ASTC_NORMALMAP_ENCODING UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_RGBM_ENCODING UNITY_NO_CUBEMAP_ARRAY UNITY_NO_RGBM UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2
Disabled keywords: DIRLIGHTMAP_COMBINED DOTS_INSTANCING_ON DR_CEL_EXTRA_ON DR_ENABLE_LIGHTMAP_DIR DR_GRADIENT_ON DR_RIM_ON DR_SPECULAR_ON DR_VERTEX_COLORS_ON FOG_EXP FOG_EXP2 FOG_LINEAR INSTANCING_ON LIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADER_API_GLES30 SHADOWS_SHADOWMASK UNITY_COLORSPACE_GAMMA UNITY_ENABLE_DETAIL_NORMALMAP UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_PBS_USE_BRDF1 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_VIRTUAL_TEXTURING _ADDITIONAL_LIGHTS _ADDITIONAL_LIGHTS_VERTEX _CELPRIMARYMODE_CURVE _CELPRIMARYMODE_SINGLE _CELPRIMARYMODE_STEPS _CLUSTERED_RENDERING _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN _NORMALMAP _RECEIVE_SHADOWS_OFF _TEXTUREBLENDINGMODE_ADD _UNITYSHADOWMODE_COLOR _UNITYSHADOWMODE_MULTIPLY _UNITYSHADOW_OCCLUSION

To Reproduce Steps to reproduce the behavior:

  1. Have a project in Unity 2021.3.24
  2. Upgrade project to Unity 2022.3.0

Expected behavior FlatKit shaders should work, but instead everything is magenta and error (see above) is shown whenever a scene a loaded

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

Unity details: Flat Kit version 3.6.0 Unity 2022.3.0f1 Dev platform: WindowsEditor Target platform: Android URP installed: True, version 14.0.7 Render pipeline: UniversalPipeline Color space: Linear Quality config: [FlatKit] Example URP Asset Graphics config: [FlatKit] Example URP Asset

Additional context Add any other context about the problem here.

rayzorite commented 1 year ago

having same problem,, did u find the fix?

Denchyaknow commented 1 year ago

Same problem here, Unity 2022.1.16f1 URP, Demo Scene 1,2,3 ect image

dustyroom-studio commented 1 year ago

Hi all!

@adrwalker @itsRayan11 Unity often significantly changes API between URP versions, so we submit different code per Unity version. When changing your project's Unity version please re-download and re-import Flat Kit with the Package Manager.

@Denchyaknow, we've just released an update to Flat Kit specifically for Unity 2022.1 that should fix this. Please re-download and re-import Flat Kit. Another way to fix this is to update your project to Unity 2022.3 or later.


Reference to this issue on Discord: https://discord.com/channels/402156640993935368/1122356189011914854

rayzorite commented 1 year ago

project

thank you, it's working now