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);
汇编:
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 中定义一个常数。