Skip to main content
GameDev.net gamedev.net
🔒 Locked

Effects in Directx

Started by royteusink Mar 10, 2008 at 8:30 AM 4 replies 2.3k views
Original Post
royteusink
royteusink
Hello there, I'm currently trying to implement a PostProcess on my DirectX (MDX, C#.NET) application. But I can't figure it out... What are the steps to implement a PostProcess on the entire screen (with fx file) in C#? Can someone give me a clean example of this ("without huge sourcecode") Any help would be appreciated.
http://www.vectorstudios.nethttp://engine.vectorstudios.net
Buckeye
Buckeye
Is there something in particular you can't figure out?

Take a look through the postprocess sample in the sdk. It has a dozen or more fx files which should give you a good start on your effect.
Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly. You don't forget how to play when you grow old; you grow old when you forget how to play.
royteusink
royteusink
Quote:
Is there something in particular you can't figure out?

I want to render full SoftShadow PostProcessing (by nvidia)

Quote:
Take a look through the postprocess sample in the sdk. It has a dozen or more fx files which should give you a good start on your effect.

I did, but i have no idea which code i need, be course it is to much source code, it's like a giant puzzle

http://developer.download.nvidia.com/shaderlibrary/packages/shadow_PCSS.zip
http://developer.download.nvidia.com/shaderlibrary/videos/shadow_PCSS.wmv

Could you please tell me with lines of code i have to use for a basic PostProcess Setup?
http://www.vectorstudios.nethttp://engine.vectorstudios.net
smally
smally
I can't personally tell you much about post processing as I'm still learning it myself. However I recommend you look at the PostProcess example via the DirectX Sample Browser
Buckeye
Buckeye
It sounds like you're trying to take one giant leap, royteusink, rather than approaching it systematically.

I certainly can't give you specific lines of code (i.e., code your application for you), but one method of postprocessing is:

1. Render the scene you want to postprocess to a rendertarget.
2. Render that target using a postprocess shader to another rendertarget.
3. Render the result as your scene.

I would suggest:

1. Write an application that renders the scene you want to postprocess.
2. When that's working, render the scene to a render target #1 and then render target #1 as the scene.
3. When that's working, render target #1 to render target #2 using your effect.
4. Render target #2 to the screen.

To ensure you're making the progress you want, insert some calls to D3DXSaveTextureToFile() so you can examine the render target(s) in a graphics editor.
Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly. You don't forget how to play when you grow old; you grow old when you forget how to play.
royteusink
royteusink
Quote:
Original post by Buckeye
It sounds like you're trying to take one giant leap, royteusink, rather than approaching it systematically.

I certainly can't give you specific lines of code (i.e., code your application for you), but one method of postprocessing is:

1. Render the scene you want to postprocess to a rendertarget.
2. Render that target using a postprocess shader to another rendertarget.
3. Render the result as your scene.

I would suggest:

1. Write an application that renders the scene you want to postprocess.
2. When that's working, render the scene to a render target #1 and then render target #1 as the scene.
3. When that's working, render target #1 to render target #2 using your effect.
4. Render target #2 to the screen.

To ensure you're making the progress you want, insert some calls to D3DXSaveTextureToFile() so you can examine the render target(s) in a graphics editor.


Thanks :)
http://www.vectorstudios.nethttp://engine.vectorstudios.net

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.