Skip to content

Instantly share code, notes, and snippets.

@behreajj
Last active May 23, 2021 01:35
Show Gist options
  • Save behreajj/a8fffd7a4388555bcdda5db99af5e5ef to your computer and use it in GitHub Desktop.
Save behreajj/a8fffd7a4388555bcdda5db99af5e5ef to your computer and use it in GitHub Desktop.
Fraction
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