카테고리 없음

텍스쳐 맵핑을 위한 픽셀쉐이더

zelkova 2021. 2. 16. 09:46

<목차로 돌아가기>

 

float4x4 matWorld;
float4x4 matView;
float4x4 matProjection;

struct VS_INPUT
{
	float4 Position : POSITION0;
    float2 TexCoord : TEXCOORD0;
};

struct VS_OUTPUT
{
	float4 Position : POSITION0;
    float2 TexCoord : TEXCOORD0;
}

VS_OUTPUT vs_main(VS_INPUT Input)
{
	VS_OUTPUT Output;
    
    Output.Position = mul(Input.Position, matWorld);
    Output.Position = mul(Output.Position, matView);
    Output.Position = mul(Output.Position, matProjection);
    
    Output.TexCoord = Input.TexCoord;
    
    return(Output);
}

 

 

 

 

반응형