Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
3 registered members (Martin_HH, steyr, alibaba), 509 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Shader effects on sprites [Re: Josh_Arldt] #52044
08/17/05 23:14
08/17/05 23:14
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany

Could you split this sentence in three, please? Step by step?

Re: Shader effects on sprites [Re: Pappenheimer] #52045
08/17/05 23:21
08/17/05 23:21
Joined: Sep 2004
Posts: 1,214
Austin, Texas
Josh_Arldt Offline
Senior Developer
Josh_Arldt  Offline
Senior Developer

Joined: Sep 2004
Posts: 1,214
Austin, Texas
Ok...
You have an alphamap for you sprite right?
In your environment mapping use a color operation with belnd current alpha for the stage with your maintexture w/the alpha channel and set AlphaBlendEnable to true.

If you still don't understand me I might post the effect later.

Re: Shader effects on sprites [Re: Josh_Arldt] #52046
08/17/05 23:47
08/17/05 23:47
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pure trial and error for me! Would be very kind, if you could post the code.

Re: Shader effects on sprites [Re: Pappenheimer] #52047
08/17/05 23:59
08/17/05 23:59
Joined: Sep 2004
Posts: 1,214
Austin, Texas
Josh_Arldt Offline
Senior Developer
Josh_Arldt  Offline
Senior Developer

Joined: Sep 2004
Posts: 1,214
Austin, Texas
Try this.

material mask_env
{
skin1 = bmp_envplane; //cube plane
event = mtl_envplane_ini;

effect =
"
texture mtlSkin1;//the cubemap
texture entSkin1;//the colormap + alpha channel
matrix matMtl;
technique spr_envmask
{
pass p0
{

Texture[1]=<mtlSkin1>;

zWriteEnable=true;
alphaBlendEnable=false;

colorOp[1]=blendCurrentAlpha;
addressU[1]=Clamp;
addressV[1]=Clamp;

TextureTransformFlags[1] =count3 ;
texcoordindex[1]= cameraspaceposition;

TextureTransform[1]=<matMtl>;
}
}
";

}

Re: Shader effects on sprites [Re: Josh_Arldt] #52048
08/18/05 10:17
08/18/05 10:17
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Doesn't make a difference.
How does your init function and the event function look like?

Re: Shader effects on sprites [Re: Pappenheimer] #52049
08/18/05 14:39
08/18/05 14:39
Joined: Mar 2001
Posts: 3,298
Beverly, Massachusetts
Rhuarc Offline
Expert
Rhuarc  Offline
Expert

Joined: Mar 2001
Posts: 3,298
Beverly, Massachusetts
Quote:

Doesn't make a difference.
How does your init function and the event function look like?



Try it while making sure the first texture stage is set, as well as a few pass variables. Never trust any cards defaults (or A6's):
Code:
material mask_env
{
skin1 = bmp_envplane; //cube plane
event = mtl_envplane_ini;

effect =
"
texture mtlSkin1;//the cubemap
texture entSkin1;//the colormap + alpha channel
matrix matMtl;
technique spr_envmask
{
pass p0
{
AlphaBlendEnable = true;
SrcBlend = SrcAlpha;
DestBlend = InvSrcAlpha;

Texture[0]=<entSkin1>
ColorOp[0]=Modulte2x;
ColorArg1[0]=Texture;
ColorArg2[0]=Diffuse;

Texture[1]=<mtlSkin1>;

zWriteEnable=true;
//alphaBlendEnable=false; //EDIT: <- THIS IS TURNING OFF ALPHA BLENDING! comment it out.

colorOp[1]=blendCurrentAlpha;
addressU[1]=Clamp;
addressV[1]=Clamp;

TextureTransformFlags[1] =count3 ;
texcoordindex[1]= cameraspaceposition;

TextureTransform[1]=<matMtl>;
}
}
";

}



Last edited by [Rhuarc]; 08/18/05 14:41.

I no longer post on these forums, keep in touch with me via:
Linkedin.com
My MSDN blog
Re: Shader effects on sprites [Re: Rhuarc] #52050
08/18/05 16:55
08/18/05 16:55
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Doesn't make a difference.

I think the problem is buried here: How does your init function and the event function look like?

Or, it is something I miss within the pics: Do I need a normalmap of the sprite?

Page 2 of 2 1 2

Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | 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