Search Issue Tracker
Fixed
Fixed in 6000.4.0a6, 6000.5.0a2
Votes
0
Found in
6000.4.0a1
6000.5.0a1
Issue ID
UUM-126726
Regression
No
Project Auditor - “Shader: Not compatible with SRP batcher” is not correctly judged
I found a bug in which “Shader: Not compatible with SRP batcher” is not correctly judged.
(This is a shader that is supposed to be SRP batcher compatible, but for some reason it is listed.)
Using the latest Project Auditor 1.0.1,
I modified the Analyze method in ShaderAnalyzer.cs as follows, and I would like to report that the correct judgment is now performed.
However, the Analyze time will be long, so it will probably not be able to be put in the repository as it is. If there are people who are having trouble, please try using it.
{code:java}
public override IEnumerable<ReportItem> Analyze(ShaderAnalysisContext context)
{
if (!IsSrpBatchingEnabled)
{
yield break;
}
if (context.Shader.name.StartsWith("Hidden/"))
{
yield break;
}
var srpCompatibilityCheckMaterial = new Material(context.Shader);
srpCompatibilityCheckMaterial.SetPass(0);
var subShaderIndex = ShaderUtilProxy.GetShaderActiveSubshaderIndex(context.Shader);
var isSrpBatchingCompatible = ShaderUtilProxy.GetSRPBatcherCompatibilityCode(context.Shader, subShaderIndex) == 0;
GameObject.DestroyImmediate(srpCompatibilityCheckMaterial);
if (!isSrpBatchingCompatible && IsSrpBatchingEnabled)
{
yield return context.CreateIssue(IssueCategory.AssetIssue, k_SrpBatcherDescriptor.Id, context.Shader.name)
.WithLocation(context.AssetPath);
}
}
{code}
Steps to reproduce:
\\
Actual results:
Expected results:
\\
Reproducible with versions:
Not reproducible with versions:
Can’t test with versions:
\\
Tested on (OS):
\\
Notes:
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Font character thickness does not adjust properly in UI Toolkit text when changing Bold Weight in Font Asset
- Multiple "[...] is inaccessible due to its protection level" errors are thrown when opening project with Unity Version Control installed
- Sorting icons are tiny and misaligned in Import Activity window
- The Undo system does not record HideFlags.HideInHierarchy changes
- [Linux] Bug Reporter window is in Light mode when the Editor theme is Dark mode
Resolution Note:
Confirmed fixed, closing
Resolution Note (fix version 6000.5.0a2):
Confirmed fixed, closing
Resolution Note (fix version 6000.5.0a2):
“Shader: Not compatible with SRP batcher” is not correctly reported