This commit is contained in:
2021-06-13 10:28:03 +02:00
parent eb70603c85
commit df2d24cbd3
7487 changed files with 943244 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
namespace UnityEditor.ShaderGraph
{
[GenerationAPI]
internal enum Blend
{
One,
Zero,
SrcColor,
SrcAlpha,
DstColor,
DstAlpha,
OneMinusSrcColor,
OneMinusSrcAlpha,
OneMinusDstColor,
OneMinusDstAlpha,
}
}

View File

@@ -0,0 +1,12 @@
namespace UnityEditor.ShaderGraph
{
[GenerationAPI]
internal enum BlendOp
{
Add,
Sub,
RevSub,
Min,
Max,
}
}

View File

@@ -0,0 +1,10 @@
namespace UnityEditor.ShaderGraph
{
[GenerationAPI]
internal enum Cull
{
Back,
Front,
Off,
}
}

View File

@@ -0,0 +1,9 @@
namespace UnityEditor.ShaderGraph
{
[GenerationAPI]
internal enum IncludeLocation
{
Pregraph,
Postgraph
}
}

View File

@@ -0,0 +1,31 @@
using System;
namespace UnityEditor.ShaderGraph
{
[GenerationAPI]
internal enum InstancingOptions
{
RenderingLayer,
NoLightProbe,
NoLodFade,
}
[GenerationAPI]
internal static class InstancingOptionsExtensions
{
public static string ToShaderString(this InstancingOptions options)
{
switch (options)
{
case InstancingOptions.RenderingLayer:
return "renderinglayer";
case InstancingOptions.NoLightProbe:
return "nolightprobe";
case InstancingOptions.NoLodFade:
return "nolodfade";
default:
throw new ArgumentOutOfRangeException();
}
}
}
}

View File

@@ -0,0 +1,10 @@
namespace UnityEditor.ShaderGraph
{
[GenerationAPI]
internal enum KeywordDefinition
{
ShaderFeature, // adds #pragma shaderfeature for the keyword
MultiCompile, // adds #pragma multicompile for the keyword
Predefined // does not add ShaderFeature or MultiCompile pragmas, and is forced to be !exposed
}
}

View File

@@ -0,0 +1,9 @@
namespace UnityEditor.ShaderGraph
{
[GenerationAPI]
internal enum KeywordScope
{
Local,
Global
}
}

View File

@@ -0,0 +1,9 @@
namespace UnityEditor.ShaderGraph
{
[GenerationAPI]
internal enum KeywordType
{
Boolean,
Enum
}
}

View File

@@ -0,0 +1,12 @@
using System;
namespace UnityEditor.ShaderGraph
{
[GenerationAPI]
internal enum NormalDropOffSpace
{
Tangent,
Object,
World
}
}

View File

@@ -0,0 +1,67 @@
using System;
namespace UnityEditor.ShaderGraph
{
[GenerationAPI]
internal enum Platform
{
D3D11,
GLCore,
GLES,
GLES3,
Metal,
Vulkan,
D3D9,
XboxOne,
GameCoreXboxOne,
GameCoreXboxSeries,
Playstation,
Switch,
}
[GenerationAPI]
internal static class PlatformExtensions
{
public static string ToShaderString(this Platform platform)
{
switch (platform)
{
case Platform.D3D11:
return "d3d11";
case Platform.GLCore:
return "glcore";
case Platform.GLES:
return "gles";
case Platform.GLES3:
return "gles3";
case Platform.Metal:
return "metal";
case Platform.Vulkan:
return "vulkan";
case Platform.D3D9:
return "d3d11_9x";
case Platform.XboxOne:
return "xboxone";
case Platform.GameCoreXboxOne:
return "xboxone";
case Platform.GameCoreXboxSeries:
return "xboxseries";
case Platform.Playstation:
return "playstation";
case Platform.Switch:
return "switch";
default:
throw new ArgumentOutOfRangeException();
}
}
}
internal static class PragmaRenderers
{
// Return high end platform list for the only renderer directive (The list use by HDRP)
internal static Platform[] GetHighEndPlatformArray()
{
return new Platform[] { Platform.D3D11, Platform.Playstation, Platform.XboxOne, Platform.GameCoreXboxSeries, Platform.Vulkan, Platform.Metal, Platform.Switch };
}
}
}

View File

@@ -0,0 +1,23 @@
namespace UnityEditor.ShaderGraph.Internal
{
[GenerationAPI]
public enum PropertyType
{
Color,
Texture2D,
Texture2DArray,
Texture3D,
Cubemap,
Gradient,
Boolean,
Float,
Vector2,
Vector3,
Vector4,
Matrix2,
Matrix3,
Matrix4,
SamplerState,
VirtualTexture
}
}

View File

@@ -0,0 +1,12 @@
namespace UnityEditor.ShaderGraph
{
[GenerationAPI]
internal enum RenderQueue
{
Background,
Geometry,
Transparent,
Overlay,
AlphaTest
}
}

View File

@@ -0,0 +1,12 @@
namespace UnityEditor.ShaderGraph
{
[GenerationAPI]
internal enum RenderType
{
Opaque,
Transparent,
TransparentCutout,
Background,
Overlay
}
}

View File

@@ -0,0 +1,46 @@
using System;
namespace UnityEditor.ShaderGraph
{
[GenerationAPI]
internal enum ShaderModel
{
Target20,
Target25,
Target30,
Target35,
Target40,
Target45,
Target46,
Target50
}
[GenerationAPI]
internal static class ShaderModelExtensions
{
public static string ToShaderString(this ShaderModel shaderModel)
{
switch (shaderModel)
{
case ShaderModel.Target20:
return "2.0";
case ShaderModel.Target25:
return "2.5";
case ShaderModel.Target30:
return "3.0";
case ShaderModel.Target35:
return "3.5";
case ShaderModel.Target40:
return "4.0";
case ShaderModel.Target45:
return "4.5";
case ShaderModel.Target46:
return "4.6";
case ShaderModel.Target50:
return "5.0";
default:
throw new ArgumentOutOfRangeException();
}
}
}
}

View File

@@ -0,0 +1,18 @@
namespace UnityEditor.ShaderGraph
{
[GenerationAPI]
internal enum ShaderValueType
{
Boolean,
Float,
Float2,
Float3,
Float4,
Matrix2,
Matrix3,
Matrix4,
Integer,
Uint,
Uint4,
}
}

View File

@@ -0,0 +1,10 @@
namespace UnityEditor.ShaderGraph
{
[GenerationAPI]
internal enum StructFieldOptions
{
Static = 0,
Optional = 1 << 0,
Generated = 1 << 1
}
}

View File

@@ -0,0 +1,14 @@
namespace UnityEditor.ShaderGraph
{
[GenerationAPI]
internal enum ZTest
{
Less,
Greater,
LEqual,
GEqual,
Equal,
NotEqual,
Always,
}
}

View File

@@ -0,0 +1,9 @@
namespace UnityEditor.ShaderGraph
{
[GenerationAPI]
internal enum ZWrite
{
On,
Off,
}
}