This commit is contained in:
SoulliesOfficial
2025-12-17 04:19:38 -05:00
parent 7c1cb7e8e1
commit d15957c719
4315 changed files with 8260710 additions and 2940 deletions

View File

@@ -0,0 +1,25 @@
#pragma once
// PowX uses the same amount of instructions as generic pow(), but has 2 advantages:
// 1) better instruction pipelining
// 2) no need to worry about NaNs
half SafePow3(half val)
{
return val * val * val;;
}
half SafePow4(half val)
{
half val2 = val * val;
return val2 * val2;
}
half SafePow5(half val)
{
half val2 = val * val;
return val2 * val2 * val;
}
half LumByMax(half3 col) { return max(max(col.x, col.y), col.z); }
half LumByDot(half3 col) { return dot(col, half3(0.3, 0.6, 0.1)); }