0 registered members (),
1,429
guests, and 8
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
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
MrCode
OP
User
|
OP
User
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.
void main()
{
cout << "I am MrCode,";
cout << "hear me roar!";
system("PAUSE");
}
|
|
|
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
MrCode
OP
User
|
OP
User
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.
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
zazang
User
|
User
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
MrCode
OP
User
|
OP
User
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.
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
oldschoolj
Senior Member
|
Senior Member
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
MrCode
OP
User
|
OP
User
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.
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
oldschoolj
Senior Member
|
Senior Member
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
|
|
|
|