Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 10:32
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
6 registered members (AndrewAMD, alibaba, fairtrader, ozgur, TipmyPip, Quad), 604 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Texture to Screen space...? [Re: ExtraCortex] #129579
05/20/07 14:58
05/20/07 14:58
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
frazzle Offline
Expert
frazzle  Offline
Expert

Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
I guess he will be gone for some days because otherwise he would have already replied to your PM, Guitar is a nice guy you know

Cheers

Frazzle


Antec® Case
Intel® X58 Chipset
Intel® i7 975 Quad Core
8 GB RAM DDR3
SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB
NVIDIA® GeForce GTX 295 Memory 1795GB
Re: Texture to Screen space...? [Re: frazzle] #129580
05/23/07 20:49
05/23/07 20:49
Joined: Jun 2005
Posts: 656
G
Grafton Offline
User
Grafton  Offline
User
G

Joined: Jun 2005
Posts: 656
You will have to update from your 6.22 pro version to do this, that version had
lots of bugs.


Not two, not one.
Re: Texture to Screen space...? [Re: Grafton] #129581
05/28/07 15:43
05/28/07 15:43
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline OP
Expert
xXxGuitar511  Offline OP
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
Sorry, I've been banned for ~10 days...

I'll just post the code:


Code:

texture mtlSkin1;
float4x4 matWorldViewProj;
float4x4 matWorldView;
float fAlpha;

sampler imageTex = sampler_state
{
Texture = <mtlSkin1>;
MinFilter = Linear;
MagFilter = Linear;
MipFilter = Linear;
AddressU = wrap;
AddressV = wrap;
};

struct vIn
{
float4 Pos : POSITION;
};

struct vOut
{
float4 Pos : POSITION;
float3 Tex : TEXCOORD0;
};

struct pIn
{
float3 Tex : TEXCOORD0;
};

vOut pVS (vIn In)
{
vOut Out = (vOut)0;
Out.Pos = mul(In.Pos, matWorldViewProj);
Out.Tex = mul(In.Pos, matWorldView).xyz;
//
return(Out);
}

float4 pPS (pIn In) : COLOR
{
float2 tPos = In.Tex.xy/In.Tex.z;
//
tPos.y = 1 - (tPos.y*1.135 + 0.5);
tPos.x = tPos.x*0.855 + 0.5;
//
float4 color = tex2D(imageTex, tPos);
color.a *= fAlpha;
//
return(color);
}

technique portalView
{
pass one
{
VertexShader = compile vs_1_1 pVS();
PixelShader = compile ps_2_0 pPS();
}
}




Kepp in mind that this uses material.skin1, not model.skin1...


xXxGuitar511
- Programmer
Page 2 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