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.
32 lines
1.2 KiB
32 lines
1.2 KiB
using System;
|
|
|
|
namespace UnityEditor.ShaderGraph.Internal
|
|
{
|
|
internal static class MipmapStreamingShaderProperties
|
|
{
|
|
public sealed class MipmapStreamingShaderProperty : Texture2DShaderProperty
|
|
{
|
|
internal override void ForeachHLSLProperty(Action<HLSLProperty> action)
|
|
{
|
|
// No Texture2D declaration needed, already declared by internal files.
|
|
// We do want to declare related mipmap streaming debugging properties, wrapped inside a macro
|
|
action(new HLSLProperty(HLSLType._CUSTOM, "UNITY_TEXTURE_STREAMING_DEBUG_VARS", HLSLDeclaration.UnityPerMaterial)
|
|
{
|
|
customDeclaration = (ssb) =>
|
|
{
|
|
ssb.TryAppendIndentation();
|
|
ssb.Append("UNITY_TEXTURE_STREAMING_DEBUG_VARS;");
|
|
}
|
|
}
|
|
);
|
|
}
|
|
}
|
|
|
|
public static readonly MipmapStreamingShaderProperty kDebugTex = new MipmapStreamingShaderProperty()
|
|
{
|
|
overrideReferenceName = "unity_MipmapStreaming_DebugTex",
|
|
generatePropertyBlock = false,
|
|
value = new SerializableTexture(),
|
|
};
|
|
}
|
|
}
|