Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
例えば、フラグメントシェーダーで赤色を出力したい。
HLSL:
return float4(1,0,0,1);
asm:
def c0, 1, 0, 0, 1 mov oC0, r0
これをAGALに実装する方法は?
mov oc, fc0
次の方法で赤い定数を渡す必要があります。
context.setProgramConstantsFromVector(Context3DProgramType.FRAGMENT, 0, Vector.<Number>([1.0, 0.0, 0.0, 1.0]));
残念ながら、agalで定数を定義することはできません。