0
votes

I have a ScrollViewer that contains a very large video (16 megapixel @ 10fps) and I want to apply a pixel shader effect to it. Given the size of the images I can't apply the effect directly to the image. So I apply the effect to the ScrollContentPresenter in the control style. Which is great, everything runs nice and fast. However, I'm also rendering annotations inside of the ScrollContentPresenter which I do NOT want effects applied to (but they need to move and scale along with the image).

Is there to apply the effect just to the clipped and displayed portion of the image or do I need to build a rather more complex control?

1
I ended up sticking a scrollviewer with no visible scrollbars into the template. Seems gross, but it works well.user237359

1 Answers

0
votes

You should use an additional texture in entry (same size as your image) containing 2 colors : one for the zone you want to apply the shader on, and one the unmodified part.

Greg Schechter has wrote a nice tut on how to use muliple inputs in a pixel shader :

http://blogs.msdn.com/greg_schechter/archive/2008/09/16/introducing-multi-input-shader-effects.aspx