(define red-mask
(effect "ColorWriteMask" (A)
(param "Red" 1)
(param "Green" 0)
(param "Blue" 0)
(param "Alpha" 1)))
When you apply the red-mask to a scene, only the red channel values of the frame buffer will be affected and will consist of the red channel components of the scene itself (unless you have a pixel shader that mixes up channels, that is).
We can use the ColorWriteMask to spatially separate the red and cyan color components of the scene, thereby rendering the scene as an anaglyph. The example style S10000_CubeIn3D shows you how to get this effect. The key functionality is implemented in anaglyph.scm, which you can bring into your own styles like a library using -
(load (resource "anaglyph.scm"))
Now, whip out your red-cyan 3D glasses. Here is a sample muvee made using the "Cube Twist in 3D" style -
No comments:
Post a Comment