Gamestudio Links
Zorro Links
Newest Posts
Zorro FIX plugin - Experimental
by flink. 04/20/24 06:09
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (henrybane, flink, Edgar_Herrera), 748 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 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