1
0
mirror of https://github.com/borgesdan/xn65 synced 2024-12-29 21:54:47 +01:00

50 lines
1.1 KiB
HLSL
Raw Normal View History

2024-04-09 15:15:11 -03:00
/**********************************************************************************
// Vertex (Arquivo de Sombreamento)
//
// Cria<69><61>o: 11 Jul 2007
// Atualiza<7A><61>o: 13 Ago 2021
// Compilador: D3DCompiler
//
// Descri<72><69>o: Define um vertex shader que apenas multiplica os v<>rtices
// por uma matriz de transforma<6D><61>o e proje<6A><65>o
//
**********************************************************************************/
// matriz de transforma<6D><61>o e proje<6A><65>o
cbuffer ConstantBuffer
{
float4x4 WorldViewProj;
}
// estrutura dos v<>rtices de entrada
struct VertexIn
{
float3 Pos : POSITION;
float4 Color : COLOR;
float2 Tex : TEXCOORD;
};
// estrutura dos v<>rtices de sa<73>da
struct VertexOut
{
float4 Pos : SV_POSITION;
float4 Color : COLOR;
float2 Tex : TEXCOORD;
};
// programa principal do vertex shader
VertexOut main(VertexIn vIn)
{
VertexOut vOut;
// transforma v<>rtices para coordenadas da tela
vOut.Pos = mul(float4(vIn.Pos, 1.0f), WorldViewProj);
// mant<6E>m as cores inalteradas
vOut.Color = vIn.Color;
// mant<6E>m as coordenadas da textura inalteradas
vOut.Tex = vIn.Tex;
return vOut;
}