summaryrefslogtreecommitdiffstats
path: root/slideshow/opengl
Commit message (Collapse)AuthorAgeFilesLines
* Fix typoAndrea Gelmini2018-05-241-1/+1
| | | | | | | Change-Id: I0635a5f4f02a1de222656133bca1ff2da8ce59f6 Reviewed-on: https://gerrit.libreoffice.org/54711 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
* slideshow: Blur the shadows the further they are from the objectEmmanuel Gil Peyrot2016-02-253-17/+74
| | | | | | | Change-Id: I63f4fda670b86db2ee1ea66d8755d71697fac0c7 Reviewed-on: https://gerrit.libreoffice.org/22678 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
* slideshow: Only use texture() in GLSL 1.50, fixes Intel on WindowsEmmanuel Gil Peyrot2016-02-254-8/+8
| | | | | | | | | | texture2D() is still available, but not in the geometry stage, so better be consistent everywhere. Change-Id: I86bf1921713bcbf32946190525401bfcc633a69f Reviewed-on: https://gerrit.libreoffice.org/22468 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
* slideshow: Add an ugly workaround for Intel’s matrix multiplicationEmmanuel Gil Peyrot2016-02-252-14/+42
| | | | | | | | | | | | When more than three multiplications are chained, Intel’s Windows driver returns a mat4 containing only zeroes, likely due to a misbehaving optimisation. This patch prevents it from doing any optimisation by doing each multiplication in its own uniform block. Change-Id: I0b435d3a5444afd47f78c379f0d2e442d2c2cfc0 Reviewed-on: https://gerrit.libreoffice.org/22470 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
* slideshow: Move Vortex calculations to the geometry stage, fixes IntelEmmanuel Gil Peyrot2016-02-252-18/+18
| | | | | | | | | | Their Windows driver was failing due to too many varyings being used between the vertex and the geometry stages. Change-Id: Iec69a2ef29e6ed4ba5ce6e46c7a5eb7db5098d1b Reviewed-on: https://gerrit.libreoffice.org/22469 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
* slideshow: Add shadows to Honeycomb, using the same way as VortexEmmanuel Gil Peyrot2016-02-093-6/+57
| | | | Change-Id: I1f8f11f900f281792b417c1efead272fe3e8432e
* slideshow: Add shadows to the Vortex transitionEmmanuel Gil Peyrot2016-02-093-9/+76
| | | | | | | | | | | These are done using a shadow mapping technique, we render both slides from the point of view of the light, and then do a second pass in which we lower the light of the fragment if some other cube is above it. Change-Id: I8aaa1428c4481661283bf69b5e56aa4d95fb80dd Reviewed-on: https://gerrit.libreoffice.org/22232 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
* slideshow: Make sure the slide is fully opaque in HoneycombEmmanuel Gil Peyrot2016-02-021-1/+1
| | | | | | | On Windows, the text is rendered with 0 of alpha, which is an issue in this transition as it enables GL_BLEND. Change-Id: I45fe32ccf77854e758eddc33f300791d4cdd6904
* slideshow: Change quads into cubes in the Vortex transitionEmmanuel Gil Peyrot2016-01-202-72/+104
| | | | | | This makes Vortex require OpenGL 3.2 instead of 2.1. Change-Id: I9438a37c2cf75e58eafc807ad1abaa22acb231b1
* slideshow: Relicense every shader of which I am the sole author to MPLEmmanuel Gil Peyrot2016-01-205-134/+39
| | | | Change-Id: I921e52d8347f3b37030818711f979517eab690a8
* slideshow: Add some volume to the Honeycomb hexagons, making them look betterEmmanuel Gil Peyrot2016-01-162-6/+36
| | | | Change-Id: Ic0f62f36faccb65ab4fbc7bb5553d096a2658f96
* slideshow: Tweak a few constants to make Glitter and Honeycomb look nicerEmmanuel Gil Peyrot2016-01-163-5/+7
| | | | Change-Id: I5dd15f3d483caaedbf58a7ad12bf24798694524f
* Fix typosAndrea Gelmini2016-01-051-1/+1
| | | | | | | Change-Id: I7c40d7eb90a5c2b5d9808683c83b664707c27cb1 Reviewed-on: https://gerrit.libreoffice.org/21128 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
* slideshow: Define inverse() to bring back the GLSL version to 1.20Emmanuel Gil Peyrot2016-01-055-5/+177
| | | | Change-Id: Ib0372d6a98734724d99b979f2d01abc1ee317847
* slideshow: Improve the Vortex transition to match PowerPoint betterEmmanuel Gil Peyrot2016-01-052-79/+69
| | | | Change-Id: I60e0b71d41a726459baeb7e590745d6bfb58e884
* slideshow: Improve the Ripple transition to match PowerPoint betterEmmanuel Gil Peyrot2016-01-051-11/+33
| | | | Change-Id: I0b8a78fc6bce5cb737cc7070b1b69184c5f6991c
* slideshow: Fix a few issues in the Glitter transitionEmmanuel Gil Peyrot2016-01-051-7/+13
| | | | | | | Remove an unused variable, add comments, reduce the time a tile stays black, and don’t rely on implicit casts of integers into floats. Change-Id: Ifacf49fe99818a62ad0430d86dc15c3bf51cf326
* chmod -xTor Lillqvist2015-12-152-0/+0
| | | | Change-Id: Ifa02bde8c84326c513df74d34077710f2e28c91e
* Use #version 140 to get inverse()Tor Lillqvist2015-12-154-4/+4
| | | | | | | | | | | | | | | The Linux GLSL imlementation is very loose in its interpretation of standards, it seems. (I am not surprised.) Not so on Windows, at least with AMD drivers. The inverse() function (for float matririces) is present only starting from GLSL 1.40. Bump the #version directive accordingly. (See https://www.opengl.org/sdk/docs/man/html/inverse.xhtml) To get this to work again on OS X will be a further challenge. There a 'legacy' context only has GLSL 1.20. But the intent is to move this code in the direction of using 'core' contexts anyway. Change-Id: I572dc7cc30f90321b233fbfd857455dc01761a7c
* slideshow: Improve the performances of the Glitter transitionEmmanuel Gil Peyrot2015-12-112-0/+115
| | | | Change-Id: Iaf482b357577ff8a5511607844a69c90ea28d29f
* slideshow: Improve the performances of the Honeycomb transitionEmmanuel Gil Peyrot2015-12-113-0/+210
| | | | Change-Id: Iacddc7b84bf0be8bb112cba88cc7fd36f72e7ca0
* slideshow: Fix lighting in the Vortex transitionEmmanuel Gil Peyrot2015-12-112-8/+36
| | | | Change-Id: I870ef7885fe569c89bde63a70ef038c4133ffbfd
* slideshow: Remove the last legacy uniformsEmmanuel Gil Peyrot2015-12-112-6/+14
| | | | Change-Id: If5f7368bf53dd59e66e990e4f2c57b6ee2cba44b
* slideshow: Upload the projection and modelview matrices as uniformsEmmanuel Gil Peyrot2015-12-112-4/+8
| | | | Change-Id: I9d6c3ad0d2cc2f691afb2c8622471286f8a5e1c7
* slideshow: upload the transform matrices as uniformsEmmanuel Gil Peyrot2015-12-112-4/+16
| | | | Change-Id: I2380fc7f8462514e6c032b18b44df51fbaaccb9f
* slideshow: Add back lighting in the SimpleTransition shadersEmmanuel Gil Peyrot2015-11-234-3/+17
| | | | Change-Id: Iec854a8369a7a9f845f261233e46aea8097db109
* slideshow: Reimplement reflections in shaders, and port Rochade and TurnAroundEmmanuel Gil Peyrot2015-11-202-0/+88
| | | | | | | This removes the hack reflections were previously, where a black quad was drawn on top of a mirror version of the first primitive only. Change-Id: I8c0863ab30e85d0130a8d7e838f3514e9be93788
* slideshow: Reimplement both Fade transitions in shadersEmmanuel Gil Peyrot2015-11-202-0/+92
| | | | Change-Id: I94187b9316a206578bb738411053afe070703f09
* slideshow: Make SimpleTransition inherit from ShaderTransitionEmmanuel Gil Peyrot2015-11-201-0/+39
| | | | | | | | | | Many transitions don’t like the simplistic default shader, especially since it doesn’t handle lighting or reflections properly. Those issues are addressed in the following commits. TODO: except lighting. Change-Id: Ia99308deb87c97d9bbe1da32aac64d0437061a84
* slideshow: Use gl_ModelViewProjectionMatrix in vertex shadersEmmanuel Gil Peyrot2015-11-192-2/+2
| | | | | | | ftransform() is deprecated, and we shouldn’t do an extraneous multiplication to obtain the two matrices together. Change-Id: Iaa16c106b8b702468f7be643a812107f0967acdd
* Improve the Vortex transitionTor Lillqvist2015-11-101-3/+11
| | | | | | | | | | | | | | 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
* Simplify and improve (?) the Vortex transitionTor Lillqvist2015-11-091-34/+14
| | | | Change-Id: I0602be9567961ca3bb5d41febd35ad65d8d7fb2a
* Now I understand why that multiplication by 10 was there originallyTor Lillqvist2015-11-081-1/+1
| | | | | | | | | | | | | | | | | | | | | 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 1877228ae8e7cc298cf4e45d061ee54774aa1d08) Change-Id: I1d350446460fe2fdd3e55f00053a5ce01d2d117c
* Improve transition shader portabilityTor Lillqvist2015-11-076-5/+22
| | | | | | | | | | | | | 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
* Make the Vortex transition a bit more interestingTor Lillqvist2015-11-062-24/+65
| | | | | | Also some minor cleanups in the C++ code. Change-Id: I106657130dd6e32b458cb416717806caac5031ce
* Add a 'Ripple' transitionTor Lillqvist2015-11-061-0/+33
| | | | Change-Id: I18efe35c299bc3a4a2a5e449021323fc1f53f378
* Nothing that would be covered by that hereTor Lillqvist2015-10-272-50/+12
| | | | Change-Id: I4f76c7699333cd9236f5231984db5c6d02a31445
* Initial work on a "Vortex" transitionTor Lillqvist2015-10-272-0/+136
| | | | | | | 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
* Bin dead codeTor Lillqvist2015-10-261-2/+0
| | | | | | We already have an if statement for (time < PART) right above. Change-Id: I43b817dd6d0a11be4ed51a5bd378806447abf69c
* Actually, the permTexture is 256*256 pixelsTor Lillqvist2015-10-261-3/+1
| | | | Change-Id: Ia32c98d8162f31a8ee0b0d0c1301ca204c9c3c87
* Add confused commentTor Lillqvist2015-10-261-0/+2
| | | | Change-Id: I5179ee1cd295f256526feebb192a8548c41276a7
* remove useless OGL transition shader codeMarkus Mohrhard2014-08-133-0/+149
Change-Id: I8930aab2b4d3fd00916f12b86fa06b5e011542ac