Commit Graph

12 Commits

Author SHA1 Message Date
Tor Lillqvist
3042270bc5 Improve the Vortex transition
Let about half the tiles move around in one direction (in front of the
slide plane), and the rest the other direction (behind the slide
plane).

Make sure tiles that rotate into each other's location go the same way
around, so that they don't pass through each others, which looks ugly.

Avoid z-fighting by not letting the tile end up exactly on top of the
one it is replacing, in case that one has not started moving yet.

Change-Id: I232b0f815412d5d575b0dde4df2d337288e645bb
2015-11-10 10:51:39 +02:00
Tor Lillqvist
6bb8194341 Simplify and improve (?) the Vortex transition
Change-Id: I0602be9567961ca3bb5d41febd35ad65d8d7fb2a
2015-11-09 09:11:46 +02:00
Tor Lillqvist
04352b481c Now I understand why that multiplication by 10 was there originally
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 1877228ae8)

Change-Id: I1d350446460fe2fdd3e55f00053a5ce01d2d117c
2015-11-08 17:31:39 +02:00
Tor Lillqvist
ef04c66659 Improve transition shader portability
Use #version 120 explicitly, and adapt the shader shader code
accordingly, to use strictly only GLSL 1.20 constructs. Also, use less
vertex attribute data in the Vortex vertex shader: We can pack the
per-vertex tile x and y index and in-tile vertex index information
into one float. Also, the shader can calculate the center of the tile
a vertex belongs to based on the knowledge of which tile it is.

Now the shader transitions work on OS X, too.

Change-Id: I93e8b5069a6d06d2e412ffee322b1eb32805e606
2015-11-07 01:45:48 +02:00
Tor Lillqvist
24db02dc8d Make the Vortex transition a bit more interesting
Also some minor cleanups in the C++ code.

Change-Id: I106657130dd6e32b458cb416717806caac5031ce
2015-11-06 20:49:55 +02:00
Tor Lillqvist
75465aadff Add a 'Ripple' transition
Change-Id: I18efe35c299bc3a4a2a5e449021323fc1f53f378
2015-11-06 01:01:44 +02:00
Tor Lillqvist
6b520a3378 Nothing that would be covered by that here
Change-Id: I4f76c7699333cd9236f5231984db5c6d02a31445
2015-10-27 14:51:34 +02:00
Tor Lillqvist
30cdd16cbf Initial work on a "Vortex" transition
The actual transition is not yet at all like the one in the competing
product. But some basic ideas are in place.

Change-Id: Ie17a4fe03ae93abe51a2f1f760f417ee4b193e2c
2015-10-27 14:39:48 +02:00
Tor Lillqvist
2e61410d25 Bin dead code
We already have an if statement for (time < PART) right above.

Change-Id: I43b817dd6d0a11be4ed51a5bd378806447abf69c
2015-10-26 13:17:39 +02:00
Tor Lillqvist
8c84777c46 Actually, the permTexture is 256*256 pixels
Change-Id: Ia32c98d8162f31a8ee0b0d0c1301ca204c9c3c87
2015-10-26 13:04:30 +02:00
Tor Lillqvist
1877228ae8 Add confused comment
Change-Id: I5179ee1cd295f256526feebb192a8548c41276a7
2015-10-26 12:27:46 +02:00
Markus Mohrhard
69e95b3946 remove useless OGL transition shader code
Change-Id: I8930aab2b4d3fd00916f12b86fa06b5e011542ac
2014-08-13 02:00:08 +02:00