Skip to content

Instantly share code, notes, and snippets.

@ScatteredRay
Created April 28, 2022 05:36
Show Gist options
  • Save ScatteredRay/793709152f1ff42d7dfbcdb99a3cd294 to your computer and use it in GitHub Desktop.
Save ScatteredRay/793709152f1ff42d7dfbcdb99a3cd294 to your computer and use it in GitHub Desktop.
Minimal Motion Builder CGFX shader
float4x4 WorldViewProjection : WorldViewProjection < string UIWidget = "None"; >;
struct app2vert {
float4 position : POSITION;
};
struct vert2pixel {
float4 position : POSITION;
};
vert2pixel VS(app2vert input) {
vert2pixel output;
output.position = mul(WorldViewProjection, input.position);
return output;
}
float4 PS(vert2pixel input) : COLOR0 {
return float4(1.0f, 0.0f, 0.0f, 1.0f);
}
technique Basic
{
pass P0
{
CullFaceEnable = true;
DepthTestEnable = true;
DepthMask = false;
DepthFunc = LEqual;
VertexProgram = compile glslv VS();
FragmentProgram = compile glslf PS();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment