© 2026 Hedgehog Software, LLC
ShaderDescription vertexShaderDesc = new ShaderDescription( ShaderStages.Vertex, Encoding.UTF8.GetBytes(VertexCode), "main"); ShaderDescription fragmentShaderDesc = new ShaderDescription( ShaderStages.Fragment, Encoding.UTF8.GetBytes(FragmentCode), "main");
using ComputeSharp; [AutoConstructor] [EmbeddedBytecode(8, 8, 1)] public readonly partial struct TestShader : IPixelShader<float4> { public float4 Execute() { float2 uv = ThreadIds.Normalized.XY; float3 col = 0.5f + 0.5f * Hlsl.Cos(new float3(uv, uv.X) + new float3(0, 2, 4)); return new(col, 1f); } }
Join the Discord to ask follow-up questions and connect with the community
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
62,470 Members