View Single Post
Old 23 December 2014, 17:44   #16
Registered User
Join Date: Aug 2004
Posts: 2,829
Originally Posted by mark_k View Post
Writing code to specially handle both those cases would probably be too much hassle. But if it were possible to specify different D3D overlay images for alternate frames, that could allow those methods and more to be tested with no other code changes. (Or just a checkbox to invert the mask image on alternate frames.)
I'm thinking of looking into whether writing a shader to experiment with that would be possible.

Does the shader know what frame number is being rendered? Or can it keep variables across frames?
For example I could try the equivalent of this in shader-language (which at this point I know nothing about ):
// Code gets called once per output frame
val++;    // val is static, value remembered from the last frame
if (val & 1)
    {render all odd-numbered pixels on each scanline black}
    {render all even-numbered pixels on each scanline black}
mark_k is offline  
Page generated in 0.08636 seconds with 9 queries