문제

For example, I want to output red color in fragment shader.

HLSL:

return float4(1,0,0,1);

asm:

def c0, 1, 0, 0, 1
mov oC0, r0

How to implement this in AGAL?

도움이 되었습니까?

해결책

mov oc, fc0

you have to pass in the red constant via:

context.setProgramConstantsFromVector(Context3DProgramType.FRAGMENT, 0, Vector.<Number>([1.0, 0.0, 0.0, 1.0]));

unfortunately, you can't define a constant in agal.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top