Last active
May 23, 2021 01:35
-
-
Save behreajj/a8fffd7a4388555bcdda5db99af5e5ef to your computer and use it in GitHub Desktop.
Fraction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shader fractScalar( | |
float A = 0.0, | |
output float Fract = 0.0, | |
output int Trunc = 0.0, | |
output float Floor = 1.0) { | |
Trunc = trunc(A); | |
Fract = A - Trunc; | |
Floor = 1.0 - Fract; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment