Home > Blockchain >  Shader graph error - 'PBRDeferredFragment': cannot convert from 'struct v2f_surf'
Shader graph error - 'PBRDeferredFragment': cannot convert from 'struct v2f_surf'

Time:01-02

I started using shader graph and created one shader, then I tried building my game however I get this error:

Shader error in 'Shader Graphs/blend': 'PBRDeferredFragment': cannot convert from 'struct v2f_surf' to 'struct SurfaceDescription' at /unfinishedProjects/handsignes/handsignes/Library/PackageCache/[email protected]/Editor/Generation/Targets/BuiltIn/Editor/ShaderGraph/Includes/PBRDeferredPass.hlsl(145) (on d3d11)

Compiling Subshader: 0, Pass: Pass 2, Vertex program with LIGHTPROBE_SH SHADOWS_SHADOWMASK
Platform defines: SHADER_API_DESKTOP UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_PASS_DEFERRED UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
Disabled keywords: DIRLIGHTMAP_COMBINED DYNAMICLIGHTMAP_ON INSTANCING_ON LIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_HDR_ON UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_VIRTUAL_TEXTURING \_GBUFFER_NORMALS_OCT \_MAIN_LIGHT_SHADOWS \_MAIN_LIGHT_SHADOWS_CASCADE \_MAIN_LIGHT_SHADOWS_SCREEN \_MIXED_LIGHTING_SUBTRACTIVE \_SHADOWS_SOFT\

I tried creating new project, copying shadergraph graph file there and building a scene with just a cude which uses material with that shader. This project has been built without any errors.

That's why I think that the problem is probably some project settings. I tried comparing every line of project settings with another project but they were equal.

I don't know what is causing this problem. if you need any screenshots of settings - ask and I will send any.

CodePudding user response:

Found the reason for this behaviour. Shader graph doesn't support built in renderer. Had to switch to URP instead.

  • Related