// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
namespace Stride.Rendering.Utils
{
    /// <summary>
    /// A shader used to output the id of the model component, mesh and material for a particular RenderMesh
    /// </summary>
    shader ModelComponentPickingShader : ShaderBase
    {
        [Color]
        stage float4 ModelComponentId;

        [Color]
        stage float4 MeshId;

        [Color]
        stage float4 MaterialId;

        stage override void PSMain()
        {
            streams.ColorTarget = ModelComponentId;
            streams.ColorTarget1 = MeshId;
            streams.ColorTarget2 = MaterialId;
        }
    };
}
