5
愚かな質問、なぜこの行:GLSL算術演算子GLSLで
float x = 1 - gl_Color.x;
を与える:
(26): error: Could not implicitly convert operands to arithmetic operator
愚かな質問、なぜこの行:GLSL算術演算子GLSLで
float x = 1 - gl_Color.x;
を与える:
(26): error: Could not implicitly convert operands to arithmetic operator
GLSLは(前120 #versionする)整数と浮動小数点との間の暗黙的な変換を可能にしません。 1
は整数で、gl_Color.x
は浮動小数点なので、エラーが発生します。あなたは速かった
float x = 1.0 - gl_Color.x;
代わり
おかげで、必要:) – Charles