Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,238 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 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 | 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