Saturday, October 15, 2011 6:19 PM
I was looking earlier today to see if there was a way of writing custom pixel shaders for Metro apps. I'll explain why in a second. Unfortunately, it appears that the Effects class from WPF (and Silverlight) isn't available and so it's not possible to write pixel shaders and 'attach' them to controls as was possible in previous technologies.
What I'm looking ultimately to do is write controls in C# that would 'pop' out of the screen when using stereoscopic screens. Is there some any way of getting into the render pipeline of controls in Metro that would help me achieve what I want to do?
It appears to be possible to write stereoscopic Direct3D 11.1 applications (see here) though I don't know about the feasibility of attaching these Direct3D concepts to existing controls. I imagine that it is possible in C++ to combine Direct3D and Xaml on a page, but I wonder if it is possible to manipulate the actual per-pixel rendering. The strategy I would really enjoy would be to write the app in C# and be able to manipulate Z-depth on each control with a Dependency Property. I wouldn't mind having to write part of this in C++.
Can anyone suggest a technique for this?
- Edited by woodced Monday, October 17, 2011 3:48 PM Grammar
Monday, October 17, 2011 11:47 PMModerator
You would need to write the entire application in Direct3D and implement your own control layer.
Creating a 3D steroscopic image to use with 3d screens and shutter glasses requires doing the 3D in Direct3D. Even if you could apply a pixel shader to a control there is no way to differentiate between the left and right frames.
Windows::UI::Xaml doesn't support UIElement for pixel shaders. Neither is is there a way to render a Xaml control to a bitmap to render in Direct3D.
- Marked As Answer by woodced Tuesday, October 18, 2011 7:27 AM
Tuesday, October 18, 2011 7:27 AM
Thanks for the reply. What a shame there is no "methodology" for this. I didn't really have my hopes up.
I do hope that pixel effects are instated in the Windows.UI.Xaml namespace before release.