Question

I am working with a WPF application which uses directX. I need to implement some effect using Pixel Shader 3.0. I can't use Pixel Shader 2.0 because of limitation of number of instruction set with Pixle Shader 2.0. Can anyone tell me how to use Pixel Shader 3.0 with directX. Any help will be of great value.

Thanks in advance.

Was it helpful?

Solution

Usually, you'd specify your pixel shader as part of a .fx file. In that case, you'd simply mark the shader with the correct model, i.e. something like

technique main
{
    pass
    {
        PixelShader = compile ps_3_0 myShader();
    }
}

Notice the ps_3_0 there? That's how you specify the shader model.

If this is not how you specify your shader, please extend your question with more information on what you are doing, and what is and isn't working.

[Edit] For an example of ps_3_0 shaders, see the Parrallax Occlusion Mapping sample in the DirectX SDK. The technique "RenderSceneWithPOM" is a good example.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top