c++ - DirectX post-processing shader -


I have a simple application in which I need to select a shader (.fx HLSL or assembly file, Probably many passes, but all and only pixel shaders) and preview it.

The application runs, the list of shaders comes up, and a button launches "Preview Window". From this preview window (in which it has a directx viewport), the user selects an image and the cinematographer runs on that image and is displayed. Only need one frame (not real time).

I have a top / pixel shader combination, which takes a tractor and renders it on the screen, textured with the chosen image it works perfectly, I have a first one on the output with effect More effects, purely need to run pixel shader, and display the final image (post-processed) on the screen. It does not work at all.

I have tried it for the last few days, but there is no clear reason, the same code block used to present every effect only represents the first I first shader Add another shader file as a second pass in the file and run it perfectly (though completely defeating its goal of previewing the user-created shaders). When I try to use the second effect (which loads and makes just fine), it does nothing. I have taken the results of the first shader (with GetRenderTargetData) and put them in a texture & amp; Surface (Desttex and Distur), then set the teststick as the input for the second pass (dev-> SetTexture and subsequent effects-> Setifitions ("this frame", Desttex).

All calls are successful, effect compilation, texture load, quad is drawn, but the effect is not seen. For the first time I suspected the device (the software was made with Vertex processing) was causing the problem, but it did not seem like it (I tried with hardware and composite) In addition, using both HAL and REF devices (there is no problem because the app is not actually real time), that second shader is not visible everything in C ++ for Direct 3D 9 has been written.

Every time you try to clean the stencil buffer after the render, the quad.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -