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,767 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
technique => undeclared identifier? #384877
10/09/11 22:51
10/09/11 22:51
Joined: Oct 2011
Posts: 21
O
oODarkPassionOo Offline OP
Newbie
oODarkPassionOo  Offline OP
Newbie
O

Joined: Oct 2011
Posts: 21
Hello,

i've a problem with shaders. Ok i'm new in shaderprogramming and i did some tutorials, in this case a simple post process shader.

When i start my programm i'll get the following error message:

technique .... undeclared identifier

Hmm why? Have anyone an idea?


Code:
MATERIAL* mtl_PostProcess={
effect="

texture TargetMap; 

sampler mySampler = sampler_state{texture=<TargetMap>;};

float4 PP_Shader (float2 Tex: TEXCOORD0):Color0
{
	float4 Color;
	Color=tex2D(mySampler,Tex.xy);
	return Color;
}
";
}

technique PP
{
pass p1
	{
	PixelShader= compile ps_1_0 PP_Shader();
	VertexShader=null;
	}
}

VIEW* postprocess={
	material=mtl_PostProcess;
	flags=PROCESS_TARGET;
}


Source: http://kstudios.de/postprocessingshader.php

Re: technique => undeclared identifier? [Re: oODarkPassionOo] #384878
10/09/11 23:00
10/09/11 23:00
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline
Serious User
painkiller  Offline
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
I'm not a shader programmer, but I think technique should be inside effect:

Code:
MATERIAL* mtl_PostProcess={
effect="

texture TargetMap; 

sampler mySampler = sampler_state{texture=<TargetMap>;};

float4 PP_Shader (float2 Tex: TEXCOORD0):Color0
{
	float4 Color;
	Color=tex2D(mySampler,Tex.xy);
	return Color;
}
technique PP
{
pass p1
	{
	PixelShader= compile ps_1_0 PP_Shader();
	VertexShader=null;
	}
}

";
}

VIEW* postprocess={
	material=mtl_PostProcess;
	flags=PROCESS_TARGET;
}




3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB
Re: technique => undeclared identifier? [Re: painkiller] #384879
10/09/11 23:09
10/09/11 23:09
Joined: Oct 2011
Posts: 21
O
oODarkPassionOo Offline OP
Newbie
oODarkPassionOo  Offline OP
Newbie
O

Joined: Oct 2011
Posts: 21
Hi,

omg so easy thanks a lot works fine laugh


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