dx11 코드를 dx11로 포팅하고 삼각형을 화면에 표시하는 방법에 따라 튜토리얼을 따라했습니다. 그러나 버텍스 쉐이더에 대한 변경 사항은 무시되는 것처럼 보이므로 항상 입력 위치와 색상을 통과합니다.DX11 버텍스 쉐이더가 무시됩니다.
입력 색상을 위치에 복사하고 출력 색상을 보라색 (아래)으로 설정하는 등의 미친 작업을 수행하더라도 정점 셰이더가 그냥 지나가고있는 것처럼 여전히 화면 가운데에 원래 삼각형이 표시됩니다 입력. 픽셀 쉐이더의 값을 변경하면 문제가 없습니다.
의미와 관련이 있습니까? 아니면 내가 잊어 버린 간단한 일을 아는 사람이 있습니까? 셰이더는 확실히 컴파일되고로드가 잘되지 않습니다. 오류가 발생하면 컴파일되지 않습니다. 나는 그들을 컴파일하기 위해 fxc.exe를 사용하고있다. 셰이더 ... 아래 숀
struct VertexInputType
{
float4 position : POSITION;
float4 color : COLOR;
};
struct PixelInputType
{
float4 position : SV_POSITION;
float4 color : COLOR;
};
PixelInputType VShader(VertexInputType input)
{
PixelInputType output;
// Change the position vector to be 4 units for proper matrix calculations.
input.position.w = 1.0f;
// Calculate the position of the vertex against the world, view, and projection matrices.
output.position = input.color;
output.color.x=1;
output.color.y=0;
output.color.z=1;
output.color.w=1;
return output;
}
float4 PShader(PixelInputType input) : SV_TARGET
{
float4 outcol;
outcol.x=0; //input.color.x;
outcol.y=input.color.y;
outcol.z=input.color.z;
outcol.w=input.color.w;
return outcol;
}