Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 18,008 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
wiki dx9 blur #132832
05/31/07 04:17
05/31/07 04:17
Joined: Mar 2004
Posts: 281
England
frescosteve Offline OP
Member
frescosteve  Offline OP
Member

Joined: Mar 2004
Posts: 281
England
Hey peeps, this code was on wiki DX9 BLur shader... I put it in a .fx file then tryed it out and it says syntax error? am i doing it wrong or what?

Code:
 texture entSkin1; float4x4 matWorldViewProj;

sampler basemap = sampler_state { Texture = <entSkin1>; };

void blur1VS( uniform float exten, in float4 inNormal : NORMAL0, in float4 inPosition : POSITION0, in float4 inTexcoord : TEXCOORD0,

out float4 outPosition : POSITION0, out float4 outTexcoord : TEXCOORD0) { inPosition.xyz += inNormal/exten; outTexcoord = inTexcoord; outPosition = mul(inPosition, matWorldViewProj); }

void blur1PS ( uniform float alpha, in float4 inTexcoord : TEXCOORD0, out float4 outColor : COLOR0) {

outColor = tex2D(basemap, inTexcoord.xy); outColor.a=alpha;

}


void mainVS( in float4 inNormal : NORMAL0, in float4 inPosition : POSITION0, in float4 inTexcoord : TEXCOORD0,

out float4 outPosition : POSITION0, out float4 outTexcoord : TEXCOORD0) { outTexcoord = inTexcoord; outPosition = mul(inPosition, matWorldViewProj); }

void mainPS(in float4 inTexcoord : TEXCOORD0, out float4 outColor : COLOR0) { outColor = tex2D(basemap, inTexcoord.xy); outColor.a=1; }

technique t1 { pass p0 { ZENABLE = TRUE; zwriteenable=true;

AlphaBlendEnable = true; VertexShader = compile vs_1_1 mainVS(); PixelShader = compile ps_2_0 mainPS(); } pass p1 { ZENABLE = TRUE; zwriteenable=true;

AlphaBlendEnable = true; VertexShader = compile vs_1_1 blur1VS(10); PixelShader = compile ps_2_0 blur1PS(0.9); } pass p2 { zwriteenable=true;

ZENABLE = TRUE; AlphaBlendEnable = true; VertexShader = compile vs_1_1 blur1VS(8); PixelShader = compile ps_2_0 blur1PS(0.9); } pass p3 { zwriteenable=true;

ZENABLE = TRUE; AlphaBlendEnable = true; VertexShader = compile vs_1_1 blur1VS(7); PixelShader = compile ps_2_0 blur1PS(0.7); } pass p4 { zwriteenable=true;

AlphaBlendEnable = true; VertexShader = compile vs_1_1 blur1VS(6); PixelShader = compile ps_2_0 blur1PS(0.7); } pass p5 { zwriteenable=true;

ZENABLE = TRUE; AlphaBlendEnable = true; VertexShader = compile vs_1_1 blur1VS(5); PixelShader = compile ps_2_0 blur1PS(0.5); } pass p6 { zwriteenable=true;

ZENABLE = TRUE; AlphaBlendEnable = true; VertexShader = compile vs_1_1 blur1VS(4); PixelShader = compile ps_2_0 blur1PS(0.5); } pass p7 { zwriteenable=true;

ZENABLE = TRUE; AlphaBlendEnable = true; VertexShader = compile vs_1_1 blur1VS(3); PixelShader = compile ps_2_0 blur1PS(0.3); } pass p8 { zwriteenable=true; zwriteenable=true;

ZENABLE = TRUE; AlphaBlendEnable = true; VertexShader = compile vs_1_1 blur1VS(2); PixelShader = compile ps_2_0 blur1PS(0.3); } pass p9 { zwriteenable=true; ZENABLE = TRUE; AlphaBlendEnable = true; VertexShader = compile vs_1_1 blur1VS(1); PixelShader = compile ps_2_0 blur1PS(0.1); }


}



Re: wiki dx9 blur [Re: frescosteve] #132833
05/31/07 07:58
05/31/07 07:58
Joined: Nov 2004
Posts: 7,121
Potsdam, Brandenburg, Germany
Machinery_Frank Offline
Senior Expert
Machinery_Frank  Offline
Senior Expert

Joined: Nov 2004
Posts: 7,121
Potsdam, Brandenburg, Germany
Yes. Your problem is: You use a very old version 6.2 pro that does not support shaders and had a lot of bugs. If you got it from a friend then this might be an old beta version that is not officially supported.

So I recommend to buy a stable version or upgrade for free to the latest one (if you have a license and a download password).

If you only want to check this software then better get the free evaluation version from the website.


Models, Textures and Games from Dexsoft
Re: wiki dx9 blur [Re: Machinery_Frank] #132834
06/01/07 02:24
06/01/07 02:24
Joined: Sep 2002
Posts: 8,177
Netherlands
PHeMoX Offline
Senior Expert
PHeMoX  Offline
Senior Expert

Joined: Sep 2002
Posts: 8,177
Netherlands
That shader works fine with A6.31 and higher actually. So get rid of your warez version Steve,

Cheers


PHeMoX, Innervision Software (c) 1995-2008

For more info visit: Innervision Software
Re: wiki dx9 blur [Re: PHeMoX] #132835
06/04/07 03:14
06/04/07 03:14
Joined: Mar 2004
Posts: 281
England
frescosteve Offline OP
Member
frescosteve  Offline OP
Member

Joined: Mar 2004
Posts: 281
England
Fixed the problem... I put two t's on the word texture. (not shown here but in the fx file there is) thanks anyways


Moderated by  Blink, Hummel, Superku 

Gamestudio download | 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