// 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.

shader BackgroundCubemapShader : BackgroundShader
{
    stage TextureCube Cubemap;

    // Shading of the sprite
    stage override float4 Shading()
    { 
		var directionVector = float3(1, 1-2*streams.TexCoord.y, 1-2*streams.TexCoord.x);
        return Intensity * Cubemap.Sample(LinearSampler, normalize(directionVector));
    }
};
