Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ---------------------- Pixel Shader for colored pixels -------------------------
- // --- Input Constants ---
- // fc0 - 4d vector for ARGB color
- // fc1.x - Dashed line tollerance, should be 0.5
- // --- Input Attributes ---
- // v0.x - Scalar representing distance along a line (for creating dashed lines)
- // --- Usage ---
- // ----------------------------------------------------------------------------------
- mov ft1 fc0 // Move color into a temporary register so we can modify it
- frc ft0.x v0.x // Get the fractional component of this pixel's distance on line
- //slt ft0.x ft0.x fc1.x // Set vt0.x to 0 or 1 based upon whether the fractional component is < 0.5
- mul ft1 ft1 ft0.x // If result is zero, don't render this pixel
- mov oc, ft1 // Move color constant to output
Add Comment
Please, Sign In to add comment