|
texld doesn't seem to keep Alpha
#35461
10/28/04 19:30
10/28/04 19:30
|
Joined: Aug 2003
Posts: 169 Tennessee, US
Ahriman
OP
Member
|
OP
Member
Joined: Aug 2003
Posts: 169
Tennessee, US
|
I am trying to use the multi-texturing shader, the problem is I am changing it to ps1.4 so that I can use more textures. looking up the instruction texld it says it should sample RGBA, being that tex is retired in this version I was thinking this was the only way.
Code:
ps_1_4
def c0,1,1,1,1
texld r1, t0
texld r2, t1
texld r3, t3
lrp r0.rgb,r3.a,r1,r2
+mov r0.a,c0
mul r0.rgb,r0,v0
seems like that code should work but it's not, if I change lrp r0.rgb,r3. a,r1,r2 to lrp r0.rgb,r3. b,r1,r2, it will then work using the blue channel of the image but I would like to be able to use the alpha as well can anyone help me on this?
|
|
|
Re: texld doesn't seem to keep Alpha
[Re: Ahriman]
#35463
10/29/04 03:41
10/29/04 03:41
|
Joined: Dec 2003
Posts: 1,097 Maryland, USA
Steempipe
Serious User
|
Serious User
Joined: Dec 2003
Posts: 1,097
Maryland, USA
|
Weird that you had to do that. What hardware, just out of curiosity. I have ran mine on Nvidia and ATI and no problems. If it needs to be added to ensure it on some card, I'd like to know what one(s). Thanks. This is what I use...... Code:
pixelShader= asm { ps.1.4 texld r0,t0 texld r1,t1 texld r2,t2 texld r3,t3 texld r4,t4 lrp r0.rgb,r3.a,r1,r0 lrp r0.rgb,r3.g,r4,r0 lrp r0.rgb,r3.b,r2,r0 mul r0.rgb,r0,v0 };
|
|
|
|