• Tor Lillqvist's avatar
    Now I understand why that multiplication by 10 was there originally · 04352b48
    Tor Lillqvist yazdı
    I was suffering from one basic misunderstanding: I did not get it that
    samplers are indexed with normalized texture coordinates, i.e. 0..1.
    (Note that multiplying a coordinate by any number does not break
    anything horribly for this use case, looking up a pseudo-random
    number, because textures by default repeat as a coordinate wraps.)
    
    We multiply by 10 so that neighbouring pixels that map to close index
    into the permTexture don't get clumped together with close sn values,
    and thus same behaviour.
    
    (Sure, the multiplication by 256 that I had changed it to worked, too,
    but not the way my initial reasoning went... So let's use the original
    10 to avoid somebody else thinking that we need to multiply by 256
    because permTexture is built from a 256x256 array.)
    
    (See 1877228a)
    
    Change-Id: I1d350446460fe2fdd3e55f00053a5ce01d2d117c
    04352b48
Adı
Son kayıt (commit)
Son güncelleme
..
inc/pch Loading commit data...
opengl Loading commit data...
qa Loading commit data...
source Loading commit data...
test Loading commit data...
util Loading commit data...
CppunitTest_slideshow.mk Loading commit data...
Executable_demoshow.mk Loading commit data...
Library_OGLTrans.mk Loading commit data...
Library_slideshow.mk Loading commit data...
Makefile Loading commit data...
Module_slideshow.mk Loading commit data...
Package_opengl.mk Loading commit data...
README Loading commit data...
manifest.txt Loading commit data...