Gamestudio Links
Zorro Links
Newest Posts
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
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,429 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
How to use PP Collection with Lite-C? #175345
12/30/07 05:10
12/30/07 05:10
Joined: Mar 2007
Posts: 677
0x00000USA
M
MrCode Offline OP
User
MrCode  Offline OP
User
M

Joined: Mar 2007
Posts: 677
0x00000USA
How do I use the Post-Processing Collection with Lite-C? The previewing code is in C-Script, but I would like to use one of the effects in one of my Lite-C projects.

BTW, I've already tried using the PP_Quad.tga thing. It doesn't work. Is there any way I could apply the shaders just to a view, without having to use PP_Quad.tga?

Last edited by MrCode; 12/30/07 05:13.

Code:
void main()
{
    cout << "I am MrCode,";
    cout << "hear me roar!";
    system("PAUSE");
}
Re: How to use PP Collection with Lite-C? [Re: MrCode] #175346
01/10/08 06:03
01/10/08 06:03
Joined: Mar 2007
Posts: 677
0x00000USA
M
MrCode Offline OP
User
MrCode  Offline OP
User
M

Joined: Mar 2007
Posts: 677
0x00000USA
67 views and no replies?


Code:
void main()
{
    cout << "I am MrCode,";
    cout << "hear me roar!";
    system("PAUSE");
}
Re: How to use PP Collection with Lite-C? [Re: MrCode] #175347
01/19/08 08:05
01/19/08 08:05
Joined: Mar 2007
Posts: 677
0x00000USA
M
MrCode Offline OP
User
MrCode  Offline OP
User
M

Joined: Mar 2007
Posts: 677
0x00000USA
Does anyone know how to use post-processing effects with Lite-C? Please?


Code:
void main()
{
    cout << "I am MrCode,";
    cout << "hear me roar!";
    system("PAUSE");
}
Re: How to use PP Collection with Lite-C? [Re: MrCode] #175348
01/19/08 10:38
01/19/08 10:38
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline
Serious User
Scorpion  Offline
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
for sure...it will work with a screen aligned quad - if you have the pro version.
Else there is no way for you.

Re: How to use PP Collection with Lite-C? [Re: Scorpion] #175349
01/19/08 19:09
01/19/08 19:09
Joined: Mar 2007
Posts: 677
0x00000USA
M
MrCode Offline OP
User
MrCode  Offline OP
User
M

Joined: Mar 2007
Posts: 677
0x00000USA
But the PP_Main.wdl script in the PP collection is the part that has the alignment code, and it works when I try to run main.wdl, which includes it, and I only have A7 Commercial.

Last edited by MrCode; 01/19/08 19:14.

Code:
void main()
{
    cout << "I am MrCode,";
    cout << "hear me roar!";
    system("PAUSE");
}
Re: How to use PP Collection with Lite-C? [Re: MrCode] #175350
01/21/08 07:08
01/21/08 07:08
Joined: Oct 2003
Posts: 702
Z
zazang Offline
User
zazang  Offline
User
Z

Joined: Oct 2003
Posts: 702
Btw I tried the A7.07 shader viewer which has 40 models and scene shader.
It worked very well for me and has an awesome collection of model and scene shaders.


I like good 'views' because they have no 'strings' attached..
Re: How to use PP Collection with Lite-C? [Re: zazang] #175351
01/21/08 08:41
01/21/08 08:41
Joined: Mar 2007
Posts: 677
0x00000USA
M
MrCode Offline OP
User
MrCode  Offline OP
User
M

Joined: Mar 2007
Posts: 677
0x00000USA
So, I guess then I should look at how it's set up in shadertest.c? I'll give it a go.

EDIT: oh, wait, nvr mind. I'll just look at the Shader Workshop (I recently updated to A7.07). Thx for the responses, though.

Last edited by MrCode; 01/21/08 09:06.

Code:
void main()
{
    cout << "I am MrCode,";
    cout << "hear me roar!";
    system("PAUSE");
}
Re: How to use PP Collection with Lite-C? [Re: MrCode] #175352
01/21/08 20:19
01/21/08 20:19
Joined: Aug 2005
Posts: 390
Florida
O
oldschoolj Offline
Senior Member
oldschoolj  Offline
Senior Member
O

Joined: Aug 2005
Posts: 390
Florida
Its pretty easy to use the pp collection, here's what I did:

Code:
  VIEW* view_bloom_blur = { material = mtl_bloom_blur; flags = CHILD | PROCESS_TARGET; } // a postprocessing view



make a view

Code:
MATERIAL* mtl_bloom_blur =
{
effect = "
Texture TargetMap;
sampler2D g_samSrcColor = sampler_state { texture = <TargetMap>; MipFilter = Linear; };

float4 vecViewPort;
float4 vecSkill1;

float4 postprocessing_bloomblur( float2 Tex : TEXCOORD0 ) : COLOR0
{
float facBlur = 3/20.;
float4 Color = tex2D( g_samSrcColor, Tex.xy);
Color += tex2D( g_samSrcColor, Tex.xy+vecViewPort.zw*facBlur);
Color += tex2D( g_samSrcColor, Tex.xy+vecViewPort.zw*facBlur*2);
Color += tex2D( g_samSrcColor, Tex.xy+vecViewPort.zw*facBlur*3);
return Color / 3.3;
}

technique PostProcess
{
pass p1
{
AlphaBlendEnable = false;
VertexShader = null;
PixelShader = compile ps_2_0 postprocessing_bloomblur();
}
}
";



make the material, i just copy and paste the ppblurbloom into the material


add camera.stage = view_bloom_blur; to your camera function

Last edited by oldschoolj; 01/21/08 20:27.

you can find me with my face in the keyboard, unshaven, listening to some nameless techno tragedy, and hashing through code over a cold cup a stale joe. __________________________________ yours truly
Re: How to use PP Collection with Lite-C? [Re: oldschoolj] #175353
01/21/08 23:56
01/21/08 23:56
Joined: Mar 2007
Posts: 677
0x00000USA
M
MrCode Offline OP
User
MrCode  Offline OP
User
M

Joined: Mar 2007
Posts: 677
0x00000USA
Oh, thanks! I didn't know there was a "PROCESS_TARGET" flag. Now I can start writing my own PP shaders (if I can figure it out, ).

Tested, and it works! There's only one problem, though. For some reason, all the meshes show up above each other. The 3D cursor in the screen below shouldn't look that way; the rectangle should be under the pyramid, not over it.



If it makes any difference, this is at 1024x768 (stupid Imageshack likes to resize images without your consent) on an nVidia GeForce 7300 GT (512MB). Also, this happens even when the view's material is set to NULL.

Last edited by MrCode; 01/22/08 00:28.

Code:
void main()
{
    cout << "I am MrCode,";
    cout << "hear me roar!";
    system("PAUSE");
}
Re: How to use PP Collection with Lite-C? [Re: MrCode] #175354
01/22/08 00:00
01/22/08 00:00
Joined: Aug 2005
Posts: 390
Florida
O
oldschoolj Offline
Senior Member
oldschoolj  Offline
Senior Member
O

Joined: Aug 2005
Posts: 390
Florida
ya i tried pretty much all of the pp codes, and found that jsut pasting them into the material, and setting the view, and the camera worked fine.


you can find me with my face in the keyboard, unshaven, listening to some nameless techno tragedy, and hashing through code over a cold cup a stale joe. __________________________________ yours truly
Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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