Commit graph

36 commits

Author SHA1 Message Date
JFonS 8f4f79c767 Fix lighting of rotated particles in 2D
Custom instance transform was not taken into account for normal map
calculation. Also renamed `extra_matrix2` to `extra_matrix_instance` for
more clarity.
2018-09-18 22:58:13 +02:00
Rémi Verschelde 4226d56ca9 Style: Enable clang-format on GLSL shaders
As of clang-format 6.0.1, putting the `/* clang-format off */` hint
around our "invalid" `[vertex]` and `[shader]` statements isn't enough
to prevent a bogus indent of the next comments and first valid statement,
so we need to enclose that first valid statement in the unformatted chunk.
2018-08-27 07:34:14 +02:00
Rémi Verschelde 1b6d75a599 Style: Fix code formatting in GLES3 shaders 2018-08-24 13:42:18 +02:00
JFonS 4421a6661d Move light 2D rotation to vertex shader 2018-07-05 11:12:04 +02:00
JFonS ac18444c7e Fix regression of 2D light height 2018-07-04 23:31:27 +02:00
JFonS e9a3cf8feb Fix rotation of 2D lights 2018-06-19 11:24:51 +02:00
Juan Linietsky 3bd0ca2a2d Skeletal deform working 2018-05-04 11:54:21 -03:00
Juan Linietsky b3e4bc562c Skeleton for 2D WIP 2018-05-03 17:29:56 -03:00
Pieter-Jan Briers 25ba49fd88 Fixes canvas light shaders.
Fixes #16904

Restore more out functionality, fix built-ins.

Requested changes, I think?
2018-04-13 15:18:28 +02:00
MrCdK 408f4cb146 Set correct types on a couple variables inside the canvas.glsl 2018-01-12 22:02:28 +01:00
Juan Linietsky 2c226e4edf Some fixes to improve precision and speed on Android. Fixes precision issues on Mali and PowerVR. 2018-01-02 18:45:00 -03:00
Guilherme Silva ffe827ab5a Fix pixel snap not being used in 3.0 2017-12-19 15:18:07 -02:00
Juan Linietsky 7eabbeb5af remove half_texpixel in canvas since no longer used 2017-11-12 08:29:28 -03:00
Nathan Warden 6adaf8f47a Fixed a bug where clamp_uv was clamping one pixel short, stretching the last pixels. 2017-11-11 07:28:48 -05:00
Juan Linietsky d4e20555e8 Ability to set a custom FOV makes it possible to use sky on orthogonal view. Closes #9186 2017-09-29 18:56:52 -03:00
Juan Linietsky ddadc782ba Fix frame selection in 2D particles, closes #10668 2017-09-06 08:31:11 -03:00
Henrik Andersson e0a19a77e5 Don't compare float to int 2017-09-04 22:21:55 +02:00
letheed 3a188015be add shadow_filter variant PCF7 2017-09-01 15:01:24 +02:00
Rémi Verschelde 82208c1e8b Merge pull request #10417 from bojidar-bg/x-fix-tilemap-transpose
Implement texture UV transpose in the gles3 renderer
2017-08-31 13:17:39 +02:00
Bojidar Marinov 92a42668f2
Implement texture UV transpose in the gles3 renderer
Now tilemap rotations work again \o/
2017-08-29 14:51:35 +03:00
letheed a5d765db4f fix shadow filter pcf5 implemented as pcf7 2017-08-25 02:34:28 +02:00
Fabio Alessandrelli 9b9a723c77 Some fixes for shaders and WebGL2
Add padding to UBO data to be multiple of 16 bytes
Add precision definition for samplers
Replace texture2D (deprecated) with texture in shaders
2017-08-11 23:26:24 +02:00
Robert Hernandez ffe8f8ca21 Fixed NinePatches not working on HTML5 2017-06-28 19:17:59 -04:00
Juan Linietsky 3ce046ee0c -Fixed SCREEN_TEXTURE and other related 2D shader parameters.
-Fixded BackBuffercopy object
2017-06-26 22:58:46 -03:00
Juan Linietsky f27d2a3355 -Moved NinePatch to shader, saves a ton of draw calls rendering UI
-Implemented missing stretch modes, now tile and tile fit work
2017-06-21 23:37:25 -03:00
Juan Linietsky 95560e02c5 2D GPU Particles working.. 2017-06-21 16:26:26 -03:00
Juan Linietsky 0288be1e76 Texture rect_region drawing now clamps UV to avoid bleeding. This avoids scenarios like single-texture tilemap tiles leaking pixels to the next tile when filter is enabled on it. 2017-06-18 22:55:02 -03:00
Juan Linietsky 5c6cac4e53 Add normalmap support for drawing in all low level primitives. Only added support in Sprite so far. 2017-06-17 23:27:42 -03:00
Juan Linietsky 80929d36be TIME constant reverted to a single float, fixes #9123 2017-06-16 08:30:21 -03:00
Juan Linietsky f8bd488457 Merge pull request #9109 from RandomShaper/optimize-2d-lighting
Add AT_LIGHT_PASS builtin to canvas shaders
2017-06-14 21:16:09 -03:00
Pedro J. Estébanez 93ffd9023f Add AT_LIGHT_PASS builtin to canvas shaders
This one allows for complex shaders paired with a simple lighting shader to skip code that would otherwise be pointlessly (and wastefully) run during the light pass.

Depending on your game (number of items and lights), this can yield some performance gain.
2017-06-15 02:03:15 +02:00
Juan Linietsky a8a1f2e2a8 -Fixed occluder rendering, closes #8560
-Ability to smooth out 2D shadow filters
2017-06-13 01:23:04 -03:00
Juan Linietsky c03131fc9f Rework shading modes and change location of light shader 2017-06-01 18:56:02 -03:00
Rémi Verschelde 93ab45b6b5 Style: Fix whole-line commented code
They do not play well with clang-format which aligns the `//` part
with the rest of the code block, thus producing badly indented commented code.
2017-01-14 14:52:23 +01:00
Juan Linietsky 1527cf8c0d 2D Shaders are working again using the new syntax, though all is buggy in general 2016-10-10 18:31:01 -03:00
Juan Linietsky 22d83bc9f6 Begining of GLES3 renderer:
-Most 2D drawing is implemented
-Missing shaders
-Missing all 3D
-Editor needs to be set on update always to be used, otherwise it does not refresh
-Large parts of editor not working
2016-10-03 21:35:16 +02:00