diff --git a/src/DirectX12GameEngine.Shaders/ShaderGenerator.cs b/src/DirectX12GameEngine.Shaders/ShaderGenerator.cs index 0aa9f330..97cc9d31 100644 --- a/src/DirectX12GameEngine.Shaders/ShaderGenerator.cs +++ b/src/DirectX12GameEngine.Shaders/ShaderGenerator.cs @@ -200,7 +200,7 @@ namespace DirectX12GameEngine.Shaders if (memberInfo is MethodInfo methodInfo) { - if (type.IsInterface || resourceType is ShaderMethodAttribute) + if (type.IsInterface) { CollectMethod(methodInfo); } @@ -269,7 +269,7 @@ namespace DirectX12GameEngine.Shaders if (memberInfo is MethodInfo methodInfo) { - if (type.IsInterface || resourceType is ShaderMethodAttribute) + if (type.IsInterface) { WriteMethod(methodInfo); } @@ -576,8 +576,7 @@ namespace DirectX12GameEngine.Shaders { private static readonly HashSet allowedAttributes = new HashSet() { - typeof(NumThreadsAttribute).FullName, - typeof(ShaderAttribute).FullName + typeof(NumThreadsAttribute).FullName }; public static bool Contains(string name) diff --git a/src/DirectX12GameEngine.Shaders/ShaderMethodAttribute.cs b/src/DirectX12GameEngine.Shaders/ShaderMethodAttribute.cs deleted file mode 100644 index 4010114f..00000000 --- a/src/DirectX12GameEngine.Shaders/ShaderMethodAttribute.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Runtime.CompilerServices; - -namespace DirectX12GameEngine.Shaders -{ - [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] - public class ShaderMethodAttribute : ShaderResourceAttribute - { - public ShaderMethodAttribute([CallerLineNumber] int order = 0) : base(order) - { - } - } - - [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] - public class ShaderAttribute : Attribute - { - public ShaderAttribute(string name) - { - Name = name; - } - - public string Name { get; } - } -}