Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (AndrewAMD, TipmyPip, OptimusPrime), 15,359 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
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 Offline OP
Member
Ahriman  Offline 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] #35462
10/28/04 19:49
10/28/04 19:49
Joined: Aug 2003
Posts: 169
Tennessee, US
Ahriman Offline OP
Member
Ahriman  Offline OP
Member

Joined: Aug 2003
Posts: 169
Tennessee, US
I think I got it, seems to be working now. when I call texld I use the write mask rgba for the destination. so -texld r3.rgba, t3- which is hopefully the right way to do it. either way it's working now.

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 Offline
Serious User
Steempipe  Offline
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

};



Re: texld doesn't seem to keep Alpha [Re: Steempipe] #35464
10/29/04 05:44
10/29/04 05:44
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
you shouldnt have to swizzle the alpha when using a texld ..

Re: texld doesn't seem to keep Alpha [Re: Matt_Aufderheide] #35465
10/29/04 18:17
10/29/04 18:17
Joined: Aug 2003
Posts: 169
Tennessee, US
Ahriman Offline OP
Member
Ahriman  Offline OP
Member

Joined: Aug 2003
Posts: 169
Tennessee, US
Actually mine is acting very strange... it now won't let me use more textures with 1.4. My hardware is a Geforce FX 5900 Ultra, maybe it's my drivers or something. But after a while I took the swizzle off and it was fine. with your code above it doesn't seem to work on mine, the first 3 textures will work but then the other two textures will show up pure white it is aggravating me

Re: texld doesn't seem to keep Alpha [Re: Ahriman] #35466
10/29/04 19:41
10/29/04 19:41
Joined: Aug 2003
Posts: 169
Tennessee, US
Ahriman Offline OP
Member
Ahriman  Offline OP
Member

Joined: Aug 2003
Posts: 169
Tennessee, US
Well something is just not liking PS1.4 so I am now using PS2.0 and its working perfect, I have 5 textures running across a terrain based on the red, green, blue, and alpha of an image. The only problem I see with this now is the compatibility of the shader with older cards, I don't think many cards support ps2.0 hopefully I am wrong. eventually we could work out a fallback I am sure.


Moderated by  Blink, Hummel, Superku 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1