Skip to content

Instantly share code, notes, and snippets.

@baobao
Last active December 7, 2018 02:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save baobao/9f08b65b3f625e07f80ce72ccda01cff to your computer and use it in GitHub Desktop.
Save baobao/9f08b65b3f625e07f80ce72ccda01cff to your computer and use it in GitHub Desktop.
// 頂点シェーダ
float4 MyVertexShader(float4 position : SV_Position) : SV_Position
{
// 渡された座標をそのまま使用する
return position;
}
// ピクセルシェーダ
float4 MyPixelShader() : SV_Target
{
// 白で描画
return float4(1, 1, 1, 1);
}
technique10 MyTechnique
{
pass MyPass
{
SetVertexShader( CompileShader( vs_5_0, MyVertexShader() ) );
SetPixelShader( CompileShader( ps_5_0, MyPixelShader() ) );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment