Skip to content

Commit

Permalink
ColorSpaces : Added int2rgba
Browse files Browse the repository at this point in the history
  • Loading branch information
TothBenoit committed Jan 28, 2025
1 parent 9d28616 commit 1bf73f3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions h3d/shader/ColorSpaces.hx
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,9 @@ class ColorSpaces extends hxsl.Shader {
var r = ycocg.g + b;
return vec3(r, g, b);
}

function int2rgba( c : Int ) : Vec4 {
return vec4((c >> 16) & 0xFF, (c >> 8) & 0xFF, c & 0xFF, (c >> 24) & 0xFF) * (1.0 / float(0xFF));
}
}
}

0 comments on commit 1bf73f3

Please sign in to comment.