CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2005
    Location
    Germany
    Posts
    18

    EVR and Pixel Shaders

    Hey guys,

    I'm relatively new to the whole DirectShow thing. I've written a small video player application for my own purposes (it uses EVR under Vista/Win7) and now I'd like to use simple pixel shaders for post processing.

    I've been googling for quite some time now. From what I understand, I basically need to compile the code via DX3DCompileShader(), then IDirect3DDevice9::CreatePixelShader() and IDirect3DDevice9::SetPixelShader().

    However, I have no idea how to get from my built graph (SourceFilter -> VideoDecoder -> EVR Renderer) to that. I guess I somehow have to create my own IDirect3DDevice9 (or get it from the EVRRenderer?), set it up with the shader calls and make the EVR Renderer somehow use that device

    Like I said, I have no real clue what to do and any help would be really great

  2. #2
    Join Date
    May 2005
    Location
    Germany
    Posts
    18

    Re: EVR and Pixel Shaders

    Okay, I was able to compile the shader file, retrieve the IDirect3DDevice9 interface, create the IDirect3DPixelShader9 and assign the pixel shader via IDirect3DDevice9::SetPixelShader(). However, it doesn't seem to work (the video stays the same and all HRESULTs from all calls were positive).
    My guess is that SetPixelShader() is always called right before each frame is "presented" to the graphics card or something? So, do I actually need to write my own EVR custom presenter for this to work?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured