/* * Copyright (c) Contributors to the Open 3D Engine Project. * For complete copyright and license terms please see the LICENSE at the root of this distribution. * * SPDX-License-Identifier: Apache-2.0 OR MIT * */ #include ShaderResourceGroup TextureMapSrg : SRG_PerObject { TextureCube texture; Sampler m_sampler { MaxAnisotropy = 16; AddressU = Wrap; AddressV = Wrap; AddressW = Wrap; }; } struct VSInput { float3 m_position : POSITION; float3 m_uvw : UV0; }; struct VSOutput { float4 m_position : SV_Position; float3 m_uvw : UV0; }; VSOutput MainVS(VSInput vsInput) { VSOutput OUT; OUT.m_position = float4(vsInput.m_position, 1.0); OUT.m_uvw = vsInput.m_uvw; return OUT; } struct PSOutput { float4 m_color : SV_Target0; }; PSOutput MainPS(VSOutput psInput) { PSOutput OUT; OUT.m_color = TextureMapSrg::texture.Sample(TextureMapSrg::m_sampler, psInput.m_uvw); return OUT; }