Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, The_Judge, Grant), 898 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Gouraud Shading Texture Blending Problem #33978
09/26/04 21:46
09/26/04 21:46
Joined: Aug 2002
Posts: 3,258
Mainz
oliver2s Offline OP
Expert
oliver2s  Offline OP
Expert

Joined: Aug 2002
Posts: 3,258
Mainz
First a screenshot:


On the screen you see a terrain with two textures. The first texture is the gras texture. The second one is the mud texture which has a alpha channel.
I have combined the two textures you can see on the screenshot.
Now the problem is: if you look at the screenshot you can see that the first textur has gouraud shading. But the second texture with the alpha channel which is blended over the first texture has no gouraud shading.
How can I apply the shading to the alpha channeled texture?

Here's the code:
Code:
texture mtlSkin1;

texture mtlSkin2;

technique terrain
{
pass p0
{
Texture[0] = <mtlSkin1>;
COLOROP[0] = Modulate;
Texture[1] = <mtlSkin2>;
COLOROP[1] = BlendTextureAlpha;

ZENABLE = true;
FILLMODE = solid;
SHADEMODE = gouraud;
ZWRITEENABLE = true;
CULLMODE = ccw;
CLIPPING = true;
LIGHTING = true;
}
}



Re: Gouraud Shading Texture Blending Problem [Re: oliver2s] #33979
09/26/04 23:24
09/26/04 23:24
Joined: Oct 2000
Posts: 1,543
Germany
A
Alexander Esslinger Offline
Senior Developer
Alexander Esslinger  Offline
Senior Developer
A

Joined: Oct 2000
Posts: 1,543
Germany
The effect you posted doesn't make much sense, it's more a random effect depending on what was rendered before - you do not set the needed states at all.

Re: Gouraud Shading Texture Blending Problem [Re: Alexander Esslinger] #33980
09/26/04 23:54
09/26/04 23:54
Joined: Aug 2002
Posts: 3,258
Mainz
oliver2s Offline OP
Expert
oliver2s  Offline OP
Expert

Joined: Aug 2002
Posts: 3,258
Mainz
What are the needed states?

Re: Gouraud Shading Texture Blending Problem [Re: oliver2s] #33981
09/27/04 00:38
09/27/04 00:38
Joined: Oct 2000
Posts: 1,543
Germany
A
Alexander Esslinger Offline
Senior Developer
Alexander Esslinger  Offline
Senior Developer
A

Joined: Oct 2000
Posts: 1,543
Germany
For example a texture operation needs two arguments, you set none of them.

Re: Gouraud Shading Texture Blending Problem [Re: Alexander Esslinger] #33982
09/27/04 02:53
09/27/04 02:53
Joined: Mar 2001
Posts: 3,298
Beverly, Massachusetts
Rhuarc Offline
Expert
Rhuarc  Offline
Expert

Joined: Mar 2001
Posts: 3,298
Beverly, Massachusetts
Try adding:

colorarg1[1]=texture;
colorarg2[1]=diffuse;

-Rhuarc


I no longer post on these forums, keep in touch with me via:
Linkedin.com
My MSDN blog
Re: Gouraud Shading Texture Blending Problem [Re: Rhuarc] #33983
09/27/04 04:26
09/27/04 04:26
Joined: Aug 2002
Posts: 3,258
Mainz
oliver2s Offline OP
Expert
oliver2s  Offline OP
Expert

Joined: Aug 2002
Posts: 3,258
Mainz
Thx you all. I have modified Steampipe's Fixed-Function-Multitexturing and now it works.


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