ASHLI viewer doesn't support swizzles???

bloodbob

Trollipop
Veteran
I finally downloaded the ASHLI viewer and was rather disappointed with the GUI ( it needs like 1280x960 res to view the entire window ) anyway I sat down and started to play with it and started to do some coding until I tried to do a simple old swizzle.

So can someone point out my mistake if I am making one?
Code:
// vertex to fragment shader io
varying vec4 Pdev;

// samplers
uniform sampler2D tex0;

// entry point
void 
main()
{
vec4 C = texture2D(tex0, Pdev);


   gl_FragColor = C*vec4(C.r,C.g,C.b,C.a); // THIS DOESN'T
//   gl_FragColor = C*C; // THIS WORKS


}

Here is the broken output

Code:
!!ARBfp1.0

# Instructions (Alu):      1
# Instructions (Tex):      0
# Registers    (Temp):     0
# Registers    (Constant): 1
# Registers    (Color):    0
# Registers    (TexCoord): 0
# Registers    (Texture):  0
# Registers    (Output):   1

PARAM Const0 = { 0, 0, 0, 0 };

OUTPUT Output0 = result.color;

MOV Output0, Const0.r;

END

and here is the working output.

Code:
!!ARBfp1.0

# Instructions (Alu):      2
# Instructions (Tex):      1
# Registers    (Temp):     1
# Registers    (Constant): 0
# Registers    (Color):    0
# Registers    (TexCoord): 1
# Registers    (Texture):  1
# Registers    (Output):   1

ATTRIB Tex0 = fragment.texcoord[0];

TEMP Temp0;

OUTPUT Output0 = result.color;

TEX Temp0, Tex0, texture[ 0], 2D;
MUL Temp0, Temp0, Temp0;
MOV Output0, Temp0;

END

All I want is a damn HLSL compiler that works :/ [/code]
 
Back
Top