o3de / sample-code-gems

Sample gems for how to create custom tools that extend the Editor, in both C++ and Python
Other
7 stars 6 forks source link

[Version 22.10] .shader json files in SixPointLighting should not contain "CompilerHints" (or any unrecognized field) #18

Open VirtualDruid opened 1 year ago

VirtualDruid commented 1 year ago
SixPointLighting_DepthPass_WithPS.shader
SixPointLighting_DepthPassTransparentMin_WithPS.shader
SixPointLighting_DepthPassTransparentMax_WithPS.shader

The files with "CompilerHints" field will cause Asset Processor failed to parse shader JSON descriptor and Material Editor will report missing shader assets.

By removing all "CompilerHints" the shader assets can be correctly loaded.

Asset Processor Logs:

2023/3/4 14:01 | Warn | >   Skipped unrecognized field '/CompilerHints' from AssetBuilder

2023/3/4 16:15 | ERROR | >  D:/workspace/o3de/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderAssetBuilder.cpp(173): 'void __cdecl AZ::ShaderBuilder::ShaderAssetBuilder::CreateJobs(const struct AssetBuilderSDK::CreateJobsRequest &,struct AssetBuilderSDK::CreateJobsResponse &) const' from AssetBuilder

2023/3/4 14:01 | ERROR | >  Failed to parse Shader Descriptor JSON: from AssetBuilder

It seems that any unrecognized fields can be treated both as warning and error, which might be confusing logs.

HogJonny-AMZN commented 1 year ago

@amzn-tommy