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.
40 lines
1.1 KiB
40 lines
1.1 KiB
using System;
|
|
|
|
namespace UnityEditor.ShaderGraph
|
|
{
|
|
[GenerationAPI]
|
|
internal enum InstancingOptions
|
|
{
|
|
AssumeUniformScaling,
|
|
RenderingLayer,
|
|
NoMatrices,
|
|
NoLightProbe,
|
|
NoLightmap,
|
|
NoLodFade,
|
|
}
|
|
|
|
[GenerationAPI]
|
|
internal static class InstancingOptionsExtensions
|
|
{
|
|
public static string ToShaderString(this InstancingOptions options)
|
|
{
|
|
switch (options)
|
|
{
|
|
case InstancingOptions.AssumeUniformScaling:
|
|
return "assumeuniformscaling";
|
|
case InstancingOptions.RenderingLayer:
|
|
return "renderinglayer";
|
|
case InstancingOptions.NoMatrices:
|
|
return "nomatrices";
|
|
case InstancingOptions.NoLightProbe:
|
|
return "nolightprobe";
|
|
case InstancingOptions.NoLightmap:
|
|
return "nolightmap";
|
|
case InstancingOptions.NoLodFade:
|
|
return "nolodfade";
|
|
default:
|
|
throw new ArgumentOutOfRangeException();
|
|
}
|
|
}
|
|
}
|
|
}
|