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
1 registered members (TipmyPip), 18,633 guests, and 5 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
Shader implementation mistake help #209317
06/02/08 13:32
06/02/08 13:32
Joined: Sep 2006
Posts: 9
netherlands
D
djamidin Offline OP
Newbie
djamidin  Offline OP
Newbie
D

Joined: Sep 2006
Posts: 9
netherlands
Hi there guys,

I am trying to implement a bump map in C++ and i use the effect_load();

however it seems after this piece of code is executed, all objects in the scene have the fx applied.
why does it apply the shader to all the models in the scene? I want it only applied to one entity-material.

I use the bump straight from the wiki

Does anyone know what is going wrong here?

texture mtlSkin1; // the entity skin
texture mtlSkin2; // the bump map
float4 vecLight; // the light vector (assign it in action)

technique bump_dot3
{
pass P0
{
// set texture stage states
Texture[0] = <mtlSkin2>;
Texture[1] = <mtlSkin1>;
TextureFactor = <vecLight>;

ColorArg1[0] = Texture; // stage 0 = bumpmap
ColorOp[0] = DotProduct3;
ColorArg2[0] = TFactor;

ColorArg1[1] = Texture; // stage 1 - skin texture
ColorOp[1] = AddSigned;
ColorArg2[1] = Current;

ColorArg1[2] = Diffuse; // stage 2 - lighting
ColorOp[2] = Modulate2x;
ColorArg2[2] = Current;
}
}


Last edited by djamidin; 06/04/08 10:23.

still learning, do not flame me
Re: Shader implementation mistake help [Re: djamidin] #209596
06/04/08 10:23
06/04/08 10:23
Joined: Sep 2006
Posts: 9
netherlands
D
djamidin Offline OP
Newbie
djamidin  Offline OP
Newbie
D

Joined: Sep 2006
Posts: 9
netherlands
No one has this problem before?

i am in dire need of assistance.


still learning, do not flame me
Re: Shader implementation mistake help [Re: djamidin] #209600
06/04/08 10:47
06/04/08 10:47
Joined: Apr 2007
Posts: 582
Germany
Poison Offline
User
Poison  Offline
User

Joined: Apr 2007
Posts: 582
Germany
Just change the mtlSkin1 and 2 to entSkin1 and 2.


Everything is possible, just Do it!
Re: Shader implementation mistake help [Re: Poison] #209656
06/04/08 19:04
06/04/08 19:04
Joined: Sep 2006
Posts: 9
netherlands
D
djamidin Offline OP
Newbie
djamidin  Offline OP
Newbie
D

Joined: Sep 2006
Posts: 9
netherlands
Done, does not help, originally it was entSkin.

aaarg i hate these bugs


still learning, do not flame me
Re: Shader implementation mistake help [Re: djamidin] #209658
06/04/08 19:33
06/04/08 19:33
Joined: May 2005
Posts: 2,713
Lübeck
Slin Offline
Expert
Slin  Offline
Expert

Joined: May 2005
Posts: 2,713
Lübeck
which material do you set it to?

Last edited by Slin; 06/04/08 19:33.
Re: Shader implementation mistake help [Re: Slin] #211339
06/16/08 10:09
06/16/08 10:09
Joined: Sep 2006
Posts: 9
netherlands
D
djamidin Offline OP
Newbie
djamidin  Offline OP
Newbie
D

Joined: Sep 2006
Posts: 9
netherlands
apparantly adding the material directly sets it to the default material which, every entity uses by default.
creating a new material fixes the problem.

sigh


still learning, do not flame me
Re: Shader implementation mistake help [Re: djamidin] #211382
06/16/08 12:08
06/16/08 12:08
Joined: Sep 2006
Posts: 9
netherlands
D
djamidin Offline OP
Newbie
djamidin  Offline OP
Newbie
D

Joined: Sep 2006
Posts: 9
netherlands
Currently applying the dot3 bumpmapping renders the entity transparant.

any idea what might be causing this?

grts,
Djam


still learning, do not flame me

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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