Skip to content

Instantly share code, notes, and snippets.

@jalava
Created July 19, 2011 18:40
Show Gist options
  • Save jalava/1093374 to your computer and use it in GitHub Desktop.
Save jalava/1093374 to your computer and use it in GitHub Desktop.
override arcane function getFragmentCode() : String
{
return "mov ft0, v1\n"+
"tex ft1, ft0, fs1 <2d,linear,nomip>\n"+
"div ft1.xyz, ft1.xyz, ft1.w\n" + // TADAAAAA : divide by the alpha channel
"sub ft1.w, ft1.w, fc0.w \n"+
"kil ft1 \n"+
"add ft1.w, ft1.w, fc0.w \n"+
// "mul ft1, ft1, v0 \n"+
"mov oc, ft1\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment