using CommunityToolkit.Mvvm.ComponentModel; using ComputeSharp.SwapChain.Core.Shaders; #if WINDOWS_UWP using ComputeSharp.Uwp; #else using ComputeSharp.WinUI; #endif namespace ComputeSharp.SwapChain.Core.ViewModels; /// /// A viewmodel for a compute shader. /// /// The name of the shader type to execute. /// The instance to execute. /// The instance to execute. public sealed partial class ShaderRunnerViewModel( string shaderType, IShaderRunner shaderRunner, PixelShaderEffect pixelShaderEffect) : ObservableObject { /// /// Gets the name of the shader type to execute. /// public string ShaderType => shaderType; /// /// Gets the instance to execute. /// public IShaderRunner ShaderRunner => shaderRunner; /// /// Gets the instance to execute. /// public PixelShaderEffect PixelShaderEffect => pixelShaderEffect; /// /// Gets or sets whether the current shader is selected. /// [ObservableProperty] public partial bool IsSelected { get; set; } }