2010년managed directx의 15
그리고 3D를 하고 싶어요.
면도기를 그려 보았다.
사진.
 
 샘플 코드
struct VS_IN {
    float4 Pos: POSITION;
    float4 color: COLOR;
};
struct VS_OUT {
    float4 Pos: POSITION;
    float4 color: COLOR;
    float2 coord: TEXCOORD;
};
VS_OUT VSmain(VS_IN In)
{
    VS_OUT output = (VS_OUT) 0;
    output.Pos = In.Pos;
    output.color = In.color;
    output.coord = In.Pos.xy;
    return output;
}
float4 PSmain(VS_OUT In): COLOR
{
    float4 color = float4(1.0, 1.0, 1.0, 1.0);
    float2 coord = In.coord;
    float2 center = float2(0.0, 0.0);
    float dist = distance(coord, center);
    if (dist < 0.5) color = float4(1.0, 1.0, 1.0, 1.0);
    else color = In.color;
    return color;
}
technique MyTechnique
{
    pass MyPass
    {
        VertexShader = compile vs_2_0 VSmain();
        PixelShader = compile ps_2_0 PSmain();
    }
}
Reference
이 문제에 관하여(2010년managed directx의 15), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/ohisama@github/items/8001585a72c3ec3703f5텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                                
                                
                                
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)