mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-11 20:03:11 +00:00
[qfcc] Fix some incorrectly specced glsl functions
Some clamps got max by mistake, and boolean mixes were backwards.
This commit is contained in:
parent
e7d3259829
commit
75f59b01c2
1 changed files with 38 additions and 17 deletions
|
@ -587,23 +587,44 @@ SRC_LINE
|
|||
"genIType max(genIType x, int y) = " GLSL(SMax) "[x, @construct (genIType, y)];" "\n"
|
||||
"genUType max(genUType x, genUType y) = " GLSL(UMax) ";" "\n"
|
||||
"genUType max(genUType x, uint y) = " GLSL(UMax) "[x, @construct (genUType, y)];" "\n"
|
||||
"genFType clamp(genFType x, genFType minVal, genFType maxVal) = " GLSL(FClamp) ";" "\n"
|
||||
"genFType clamp(genFType x, float minVal, float maxVal) = " GLSL(FMax) "[x, @construct (genFType, minVal), @construct (genFType, maxVal)];" "\n"
|
||||
"genDType clamp(genDType x, genDType minVal, genDType maxVal) = " GLSL(FClamp) ";" "\n"
|
||||
"genDType clamp(genDType x, double minVal, double maxVal) = " GLSL(FMax) "[x, @construct (genDType, minVal), @construct (genDType, maxVal)];" "\n"
|
||||
"genIType clamp(genIType x, genIType minVal, genIType maxVal) = " GLSL(IClamp) ";" "\n"
|
||||
"genIType clamp(genIType x, int minVal, int maxVal) = " GLSL(SMax) "[x, @construct (genIType, minVal), @construct (genIType, maxVal)];" "\n"
|
||||
"genUType clamp(genUType x, genUType minVal, genUType maxVal) = " GLSL(UClamp) ";" "\n"
|
||||
"genUType clamp(genUType x, uint minVal, uint maxVal) = " GLSL(UMax) "[x, @construct (genUType, minVal), @construct (genUType, maxVal)];" "\n"
|
||||
"genFType mix(genFType x, genFType y, genFType a) = " GLSL(FMix) ";""\n"
|
||||
"genFType mix(genFType x, genFType y, float a) = " GLSL(FMix) "[x, y, @construct (genFType, a)];" "\n"
|
||||
"genDType mix(genDType x, genDType y, genDType a) = " GLSL(FMix) ";""\n"
|
||||
"genDType mix(genDType x, genDType y, double a) = " GLSL(FMix) "[x, y, @construct (genDType, a)];" "\n"
|
||||
"genFType mix(genFType x, genFType y, genBType a) = " SPV(OpSelect) ";" "\n"
|
||||
"genDType mix(genDType x, genDType y, genBType a) = " SPV(OpSelect) ";" "\n"
|
||||
"genIType mix(genIType x, genIType y, genBType a) = " SPV(OpSelect) ";" "\n"
|
||||
"genUType mix(genUType x, genUType y, genBType a) = " SPV(OpSelect) ";" "\n"
|
||||
"genBType mix(genBType x, genBType y, genBType a) = " SPV(OpSelect) ";" "\n"
|
||||
"genFType clamp(genFType x, genFType minVal, genFType maxVal)" "\n"
|
||||
" = " GLSL(FClamp) ";" "\n"
|
||||
"genFType clamp(genFType x, float minVal, float maxVal)" "\n"
|
||||
" = " GLSL(FClamp) "[x, @construct (genFType, minVal)," "\n"
|
||||
"@construct (genFType, maxVal)];" "\n"
|
||||
"genDType clamp(genDType x, genDType minVal, genDType maxVal)" "\n"
|
||||
" = " GLSL(FClamp) ";" "\n"
|
||||
"genDType clamp(genDType x, double minVal, double maxVal)" "\n"
|
||||
" = " GLSL(FClamp) "[x, @construct (genDType, minVal)," "\n"
|
||||
"@construct (genDType, maxVal)];" "\n"
|
||||
"genIType clamp(genIType x, genIType minVal, genIType maxVal)" "\n"
|
||||
" = " GLSL(IClamp) ";" "\n"
|
||||
"genIType clamp(genIType x, int minVal, int maxVal)" "\n"
|
||||
" = " GLSL(IClamp) "[x, @construct (genIType, minVal)," "\n"
|
||||
"@construct (genIType, maxVal)];" "\n"
|
||||
"genUType clamp(genUType x, genUType minVal, genUType maxVal)" "\n"
|
||||
" = " GLSL(UClamp) ";" "\n"
|
||||
"genUType clamp(genUType x, uint minVal, uint maxVal)" "\n"
|
||||
" = " GLSL(UClamp) "[x, @construct (genUType, minVal)," "\n"
|
||||
"@construct (genUType, maxVal)];" "\n"
|
||||
"genFType mix(genFType x, genFType y, genFType a)" "\n"
|
||||
" = " GLSL(FMix) ";" "\n"
|
||||
"genFType mix(genFType x, genFType y, float a)" "\n"
|
||||
" = " GLSL(FMix) "[x, y, @construct (genFType, a)];" "\n"
|
||||
"genDType mix(genDType x, genDType y, genDType a)" "\n"
|
||||
" = " GLSL(FMix) ";" "\n"
|
||||
"genDType mix(genDType x, genDType y, double a)" "\n"
|
||||
" = " GLSL(FMix) "[x, y, @construct (genDType, a)];" "\n"
|
||||
"genFType mix(genFType x, genFType y, genBType a)" "\n"
|
||||
" = " SPV(OpSelect) "[a,y,x];" "\n"
|
||||
"genDType mix(genDType x, genDType y, genBType a)" "\n"
|
||||
" = " SPV(OpSelect) "[a,y,x];" "\n"
|
||||
"genIType mix(genIType x, genIType y, genBType a)" "\n"
|
||||
" = " SPV(OpSelect) "[a,y,x];" "\n"
|
||||
"genUType mix(genUType x, genUType y, genBType a)" "\n"
|
||||
" = " SPV(OpSelect) "[a,y,x];" "\n"
|
||||
"genBType mix(genBType x, genBType y, genBType a)" "\n"
|
||||
" = " SPV(OpSelect) "[a,y,x];" "\n"
|
||||
"genFType step(genFType edge, genFType x)" "\n"
|
||||
" = " GLSL(Step) ";" "\n"
|
||||
"genFType step(float edge, genFType x)" "\n"
|
||||
|
|
Loading…
Reference in a new issue