wiki dx9 blur

Posted By: frescosteve

wiki dx9 blur - 05/31/07 04:17

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); }


}


Posted By: Machinery_Frank

Re: wiki dx9 blur - 05/31/07 07:58

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.
Posted By: PHeMoX

Re: wiki dx9 blur - 06/01/07 02:24

That shader works fine with A6.31 and higher actually. So get rid of your warez version Steve,

Cheers
Posted By: frescosteve

Re: wiki dx9 blur - 06/04/07 03:14

Fixed the problem... I put two t's on the word texture. (not shown here but in the fx file there is) thanks anyways
© 2023 lite-C Forums