Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (7th_zorro, TipmyPip, RealSerious3D), 892 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
[SOLVED] Enable additive blending #447092
11/15/14 22:55
11/15/14 22:55
Joined: Jan 2005
Posts: 330
USA
M
MatAllum Offline OP
Senior Member
MatAllum  Offline OP
Senior Member
M

Joined: Jan 2005
Posts: 330
USA
Edit: Fixed the problem below. Now wondering how to enable additive blending via shader, as setting BRIGHT no longer works when I apply the shader.

I have the distinct feeling I'm leaving something out, but my shader is definitely not working as intended. For now it's a very simple deal; save on texture space by mirroring a symmetrical health bar. The model is properly mapped outside the regular texture coordinates. But I'm not seeing any effect by using AddressU or AddressV:

Code:
texture entSkin1;
sampler basemap = sampler_state
{
	texture=(entSkin1);
AddressU = Mirror;
AddressV = Mirror;
};



Clamp would also be nice to get working, but not entirely necessary. Am I leaving something important out here?

Re: Texture address clamp/mirror not working [Re: MatAllum] #447094
11/15/14 23:12
11/15/14 23:12
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
wrong brackets?

it works for me

Code:
sampler tileSampler1 = sampler_state 
{ 
   Texture = <entSkin2>; 
   MinFilter = Linear;
	MagFilter = Linear;
	MipFilter = Linear;
	AddressU = mirror;
	AddressV = mirror;
};



Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Texture address clamp/mirror not working [Re: sivan] #447095
11/15/14 23:51
11/15/14 23:51
Joined: Jan 2005
Posts: 330
USA
M
MatAllum Offline OP
Senior Member
MatAllum  Offline OP
Senior Member
M

Joined: Jan 2005
Posts: 330
USA
OH MY GOD.

I also forgot to apply the material to the model.
That said, thank you for giving me the correct syntax. laugh

New question related to the same concept: how do you enable additive blending in the shader? The model BRIGHT flag is set but by applying the new shader, it just sits there fully opaque.

Re: Texture address clamp/mirror not working [Re: MatAllum] #447099
11/16/14 11:07
11/16/14 11:07
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
brackets don't even matter.. at least I sometimes forget them and everything works fine.


POTATO-MAN saves the day! - Random
Re: Texture address clamp/mirror not working [Re: Kartoffel] #447101
11/16/14 15:40
11/16/14 15:40
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
instead of multiplying colours and lights, use addition to get additive blending


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Texture address clamp/mirror not working [Re: sivan] #447102
11/16/14 18:09
11/16/14 18:09
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
you have to set ScrBlend and DestBlend in the pass to some special values.

(maybe ScrBlend = ScrAlpha and DestBlend = One... but I don't know)


POTATO-MAN saves the day! - Random
Re: Texture address clamp/mirror not working [Re: Kartoffel] #447103
11/16/14 18:38
11/16/14 18:38
Joined: Jan 2005
Posts: 330
USA
M
MatAllum Offline OP
Senior Member
MatAllum  Offline OP
Senior Member
M

Joined: Jan 2005
Posts: 330
USA
Thanks guys, I got it set up correctly now. laugh


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