Message3371

Author jesusalva
Recipients
Date 2016-11-01.21:12:38
Content
commit f5be9e4ac061bc47f410bed15c6e2cd4eddb1668
Author: ahuillet <ahuillet@freedroid.org>
Date:   Fri Oct 28 12:36:09 2016 +0200

    GL blitter shader: fix wrong texture unit being picked due to FP
    operations
    
    floating point operations on the Z texture coord are not exact, such
    that the computed Z texture coordinate (which really is the texture unit
    times 10) isn't exact, and can sometimes be a bit less than the expected
    value (20 - epsilon instead of 20).
    The fragment shader truncates the value to compute the texture unit to
    texture from -- so 20 - epsilon ends up being 19, an invalid unit number
    that is displayed as red by the fragment shader (to draw attention to
    the problem).
    
    The fix consists in making sure that the value passed to the fragment
    shader is always slightly greater than the expected value, such that
    truncating yields that expected value exactly.

------------------
Issue closed.
History
Date User Action Args
2016-11-01 21:12:39jesusalvasetmessageid: <1478034759.63.0.080405699843.issue865@freedroid.org>
2016-11-01 21:12:39jesusalvalinkissue865 messages
2016-11-01 21:12:38jesusalvacreate