// 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.
/// <summary>
/// Defines the normal, view space normal and tangent streams.
/// </summary>
shader NormalStream
{
    // The normal attribute from the mesh
    stage stream float3 meshNormal : NORMAL;

    // The above normal but in world space
    stage stream float3 meshNormalWS;   // This gets set in "NormalFromNormalMapping.sdsl" and "NormalFromMesh.sdsl".
    
    // The tangent attribute from the mesh
    stage stream float4 meshTangent : TANGENT;
	
    // The normal in world space
    stage stream float3 normalWS : NORMALWS;

    // The tangent to view matrix to transform a tangent normal vector to normal vector in viewspace
    stage stream float3x3 tangentToWorld;
};
