Added mustache mapping models
このコミットが含まれているのは:
1 親
ac76bfdfab
コミット
0609dee01a
6ファイル変更
+120
-2
検索条件に一致するファイルはありません
@@ -5,14 +5,14 @@ static {{FieldType}} {{FieldName}} = {{FieldValue}};
|
||||
{{/IsStaticScalarField}}
|
||||
{{!Constant buffer}}
|
||||
{{#IsConstantBuffer}}
|
||||
cbuffer {{FieldName}}Buffer : register(b{{BufferIndex}})
|
||||
cbuffer {{FieldName}}Buffer : register(b{{ConstantBufferIndex}})
|
||||
{
|
||||
{{FieldType}} {{FieldName}};
|
||||
}
|
||||
{{/IsConstantBuffer}}
|
||||
{{!Read write buffer}}
|
||||
{{#IsReadWriteBuffer}}
|
||||
{{FieldType}} {{FieldName}} : SV_DispatchThreadId : register(u{{BufferIndex}});
|
||||
{{FieldType}} {{FieldName}} : SV_DispatchThreadId : register(u{{ReadWriteBufferIndex}});
|
||||
{{/IsReadWriteBuffer}}
|
||||
|
||||
{{/FieldsList}}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
#pragma warning disable CS8618 // Non-nullable field is uninitialized
|
||||
|
||||
namespace DirectX12GameEngine.Shaders.Renderer.Models.Abstract
|
||||
{
|
||||
/// <summary>
|
||||
/// A <see langword="class"/> that contains info on a shader field
|
||||
/// </summary>
|
||||
public abstract class FieldInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the type of the current field
|
||||
/// </summary>
|
||||
public string FieldType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name to use for the current field
|
||||
/// </summary>
|
||||
public string FieldName { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using DirectX12GameEngine.Shaders.Renderer.Models.Abstract;
|
||||
|
||||
namespace DirectX12GameEngine.Shaders.Renderer.Models.Fields
|
||||
{
|
||||
/// <summary>
|
||||
/// A <see langword="class"/> that contains info on a constant buffer field
|
||||
/// </summary>
|
||||
public sealed class ConstantBufferFieldInfo : FieldInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets whether or not the current <see cref="FieldInfo"/> instance represents a constant buffer (always <see langword="true"/>)
|
||||
/// </summary>
|
||||
public bool IsConstantBuffer { get; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the index of the current constant buffer field
|
||||
/// </summary>
|
||||
public int ConstantBufferIndex { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using DirectX12GameEngine.Shaders.Renderer.Models.Abstract;
|
||||
|
||||
namespace DirectX12GameEngine.Shaders.Renderer.Models.Fields
|
||||
{
|
||||
/// <summary>
|
||||
/// A <see langword="class"/> that contains info on a read write buffer field
|
||||
/// </summary>
|
||||
public sealed class ReadWriteBufferFieldInfo : FieldInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets whether or not the current <see cref="FieldInfo"/> instance represents a read write buffer (always <see langword="true"/>)
|
||||
/// </summary>
|
||||
public bool IsConstantBuffer { get; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the index of the current read write buffer field
|
||||
/// </summary>
|
||||
public int ReadWriteBufferIndex { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using DirectX12GameEngine.Shaders.Renderer.Models.Abstract;
|
||||
|
||||
namespace DirectX12GameEngine.Shaders.Renderer.Models.Fields
|
||||
{
|
||||
/// <summary>
|
||||
/// A <see langword="class"/> that contains info on a static scalar field
|
||||
/// </summary>
|
||||
public sealed class StaticScalarFieldInfo : FieldInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets whether or not the current <see cref="FieldInfo"/> instance represents a static scalar value (always <see langword="true"/>)
|
||||
/// </summary>
|
||||
public bool IsStaticScalarField { get; } = true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
using System.Collections.Generic;
|
||||
using DirectX12GameEngine.Shaders.Renderer.Models.Abstract;
|
||||
|
||||
#pragma warning disable CS8618 // Non-nullable field is uninitialized
|
||||
|
||||
namespace DirectX12GameEngine.Shaders.Renderer.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// A <see langword="class"/> that contains info to render a shader source to compile
|
||||
/// </summary>
|
||||
public sealed class ShaderInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the list of fields being present in the current shader
|
||||
/// </summary>
|
||||
public List<FieldInfo> FieldsList { get; } = new List<FieldInfo>();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the number of threads in the X group
|
||||
/// </summary>
|
||||
public int ThreadsX { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the number of threads in the Y group
|
||||
/// </summary>
|
||||
public int ThreadsY { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the number of threads in the Z group
|
||||
/// </summary>
|
||||
public int ThreadsZ { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name for the threads id variable used in the shader
|
||||
/// </summary>
|
||||
public string ThreadsIdsVariableName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the shader body to compile
|
||||
/// </summary>
|
||||
public string ShaderBody { get; set; }
|
||||
}
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする