Question

Par exemple, je veux sortie couleur rouge dans Shader fragment.

HLSL:

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

asm:

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

Comment implémenter dans AGAL?

Était-ce utile?

La solution

mov oc, fc0

vous devez passer à la constante rouge via:

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

malheureusement, vous ne pouvez pas définir une constante dans AGAL.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top