You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

23 lines
756 B

using System.Diagnostics.CodeAnalysis;
using UnityEngine;
namespace UnityEditor.Rendering.HighDefinition
{
class HDRPDisabledComputeShaderVariantStripper : IComputeShaderVariantStripper
{
public bool active => !HDRPBuildData.instance.buildingPlayerForHDRenderPipeline;
public bool CanRemoveVariant([DisallowNull] ComputeShader shader, string _, ShaderCompilerData __)
{
var shaderInstanceID = shader.GetInstanceID();
if (HDRPBuildData.instance.computeShaderCache.ContainsKey(shaderInstanceID))
return true;
if (HDRPBuildData.instance.rayTracingComputeShaderCache.ContainsKey(shaderInstanceID))
return true;
return false;
}
}
}