Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (degenerate_762, AbrahamR, AndrewAMD, ozgur), 667 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
texture scale #390881
01/05/12 16:30
01/05/12 16:30
Joined: Jul 2011
Posts: 39
G
Giti Offline OP
Newbie
Giti  Offline OP
Newbie
G

Joined: Jul 2011
Posts: 39
how to change a texture scale of a model in runtime?

i want change texture size of a model to smaller and repeat it in runtime. i want change skin[s] size.

Last edited by Giti; 01/06/12 07:28.
Re: texture scale [Re: Giti] #390942
01/06/12 07:27
01/06/12 07:27
Joined: Jul 2011
Posts: 39
G
Giti Offline OP
Newbie
Giti  Offline OP
Newbie
G

Joined: Jul 2011
Posts: 39
help please

Re: texture scale [Re: Giti] #390946
01/06/12 08:22
01/06/12 08:22
Joined: Mar 2006
Posts: 2,252
Hummel Offline
Expert
Hummel  Offline
Expert

Joined: Mar 2006
Posts: 2,252
col = tex2D(SAMPLER, Tex*scale); ?

Re: texture scale [Re: Hummel] #390977
01/06/12 16:55
01/06/12 16:55
Joined: Jul 2011
Posts: 39
G
Giti Offline OP
Newbie
Giti  Offline OP
Newbie
G

Joined: Jul 2011
Posts: 39
is shader?

Re: texture scale [Re: Giti] #390980
01/06/12 17:03
01/06/12 17:03
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Take this shader:
http://www.conitec.net/shaders/shader_work2.htm
add
float4 vecSkill41;
and in your pixel shader
float4 Color = tex2D(ColorMapSampler, InTex*vecSkill41.x);

Now you can control the scale of your texture with entity.skill41 (set skill with floatv()).


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: texture scale [Re: Superku] #390983
01/06/12 18:32
01/06/12 18:32
Joined: Jul 2011
Posts: 39
G
Giti Offline OP
Newbie
Giti  Offline OP
Newbie
G

Joined: Jul 2011
Posts: 39
tanx. its work.
but when sknill41 > 1 or < 0 , the texture is damaged.
i want try to pressed and I repeat the texture.

Re: texture scale [Re: Giti] #391001
01/06/12 21:55
01/06/12 21:55
Joined: Mar 2006
Posts: 2,252
Hummel Offline
Expert
Hummel  Offline
Expert

Joined: Mar 2006
Posts: 2,252
// Color map sampler
sampler ColorMapSampler = sampler_state
{
Texture = <entSkin1>;
AddressU = Wrap;
AddressV = Wrap;
};

Re: texture scale [Re: Hummel] #391005
01/06/12 22:36
01/06/12 22:36
Joined: Jul 2011
Posts: 39
G
Giti Offline OP
Newbie
Giti  Offline OP
Newbie
G

Joined: Jul 2011
Posts: 39
dear Hummel , can you write all of the your fx file?
my HLSL is not good.

Re: texture scale [Re: Giti] #391015
01/07/12 00:56
01/07/12 00:56
Joined: Jul 2007
Posts: 619
Turkey, Izmir
Emre Offline
User
Emre  Offline
User

Joined: Jul 2007
Posts: 619
Turkey, Izmir
You don't need fx file. Your texture is damaged, because "AddressU & AddressV=clamp". it must be wrap. So copy the hummel's post and replace it with your code.

Re: texture scale [Re: Emre] #391022
01/07/12 02:26
01/07/12 02:26
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Sorry for slightly off-topic, but can anyone give me a link to
a list of the various sampler states in HLSL?
And most importantly, what their DEFAULT values are?


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Page 1 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