Commit graph

283 commits

Author SHA1 Message Date
Thomas Herzog f123694b4e
Merge pull request #21357 from karroffel/gles2-shader-language-f-to-pay-respects
[GLES2] fix wrong shader compiler output
2018-08-24 12:14:40 +02:00
Thomas Herzog 56bab6509c
Merge pull request #21318 from karroffel/gles2-shader-fixes
[GLES2] attempt to fix some android problems
2018-08-24 12:14:20 +02:00
Thomas Herzog 2fa4b50027 [GLES2] fix wrong shader compiler output
The `f` postfix was working fine on dekstop GL but not on
some mobile drivers.
2018-08-24 12:10:54 +02:00
Thomas Herzog 211e0fa4aa [GLES2] fix multimesh byte colors
When using float colors, everything works fine, but when using
the byte format, the colors were read incorrectly.
2018-08-24 11:23:42 +02:00
Rémi Verschelde b2494d3898
Merge pull request #21325 from karroffel/gles2-texture-flags
[GLES2] fix texture flags not having an effect
2018-08-23 22:22:33 +02:00
Thomas Herzog 8884b3daad [GLES2] fix texture flags not having an effect 2018-08-23 18:25:55 +02:00
Thomas Herzog 0edb50f629
Merge pull request #21321 from karroffel/gles2-canvas-modulate
[GLES2] fix CanvasModulate not working
2018-08-23 18:15:42 +02:00
Thomas Herzog 0f59cc179c [GLES2] fix CanvasModulate not working
That's what happens when you forget about your debug
shortcuts.

Fixes #21025
2018-08-23 17:38:20 +02:00
Thomas Herzog 5ebc70f288 [GLES2] fix depth for alpha pass 2018-08-23 17:25:00 +02:00
Thomas Herzog d61fc6a97b
Merge pull request #21317 from karroffel/gles2-canvas-texture-sampler-long-branch-name
[GLES2] fix canvas_item sampler allocation
2018-08-23 17:11:00 +02:00
Thomas Herzog a7bedaf935 [GLES2] attempt to fix some android problems 2018-08-23 17:08:16 +02:00
Thomas Herzog da876907fd [GLES2] fix canvas_item sampler allocation 2018-08-23 16:46:43 +02:00
Thomas Herzog 8e7454e5d7 enable hardware skeletons 2018-08-23 16:13:45 +02:00
elasota 35f6ba5c5d BPTC support 2018-08-21 22:56:04 -04:00
Marcin Zawiejski bd5ff205b2 Revert "Batch GLES2 draw calls"
This reverts commit f55039b194.

The GLES2 batching seems to require more testing and tweaking in order
to actually make the performance better on Android devices. It's been
proved with #21184 that the current implementation has it's drawbacks
therefore I suggest reverting the commit for now.
2018-08-20 02:10:14 +02:00
Thomas Herzog b4ce1e3005
Merge pull request #20965 from dragmz/gles2_batching
Batch GLES2 draw calls
2018-08-18 18:37:52 +02:00
dumitru.stama 5a74b15b3d Removed the lines forcing black screen on android GLES2 2018-08-17 22:26:30 -07:00
Thomas Herzog 0ef85b55e0 [gles2] fix black bar artifacts 2018-08-15 17:12:21 +02:00
Rémi Verschelde 4c6cf97257
Merge pull request #20941 from codingHahn/fix-normals-on-shader
Fix handling of normals that approach 1
2018-08-15 08:40:16 +02:00
Marcin Zawiejski ab1e460f53
Reduce verbosity for unsupported GLES2 bg modes 2018-08-14 15:11:19 +02:00
Marcin Zawiejski f55039b194 Batch GLES2 draw calls
Adds GLES2 draw calls batching for the same render list item that uses
multiple rasterizer commands (e.g. Label node; a node with multiple
GDScript draw_* calls).
2018-08-14 10:47:16 +02:00
Thomas Herzog 3d2984c962 [gles2] added ImmediateGeometry rendering 2018-08-13 16:16:23 +02:00
Nick Hahn 66eba18969 Fix handling of normals that approach 1 2018-08-12 12:45:43 +02:00
Marcin Zawiejski a0afaaeeb9 Fix mat4 uniform writes 2018-08-08 21:39:43 +02:00
Thomas Herzog 1800664e80
Merge pull request #20805 from karroffel/gles2-misc-fixes
unhacking some GLES2 code
2018-08-08 17:28:35 +02:00
Thomas Herzog 73fe08be2e GLES2 refactors
This commit unhacks some parts of the 3D rendering.

Most notably:

 - possibility to use negative texture units
   (no longer weird manual index allocation for user samplers)

 - refactoring of light code, now sorts in a different way,
   should yield better performance

 - fixes a crash while saving (because of "Illegal instruction" execution)
   when using a decent compiler (clang, it's clang. Thanks GCC for not telling me about UB).
2018-08-08 17:09:44 +02:00
Juan Linietsky b67f982723
Merge pull request #20681 from DavidSichma/master
Keeping track of discard
2018-08-08 09:54:59 -03:00
Hugo Locurcio 31c12f05c4
Tweak the default SpatialMaterial properties
Roughness is now set to 1 by default and albedo is now white,
even on meshes that do not have any materials defined.

This means there is no longer a visual difference between a
mesh with no materials defined and a mesh with a default
SpatialMaterial defined.
2018-08-07 17:04:30 +02:00
Juan Linietsky edde52c8de Added proper import support for 3D and Array textures 2018-08-06 14:56:06 -03:00
Juan Linietsky 07a982e614
Merge pull request #20597 from karroffel/tex3d
add 3D textures
2018-08-06 07:20:00 -03:00
Marcin Zawiejski 477f496162
Fix uniform set for mat3 and mat4 2018-08-04 07:30:25 +02:00
David Sichma c101dd5fa6 Keeping track of discard
Shader compilation now keeps track of the discard key word.

Previously only variables were monitored. But discard, which needs
special treatment in some cases, went unnoticed by the compiler as
discard is not a variable but a flow control.

This commit adds monitoring for discard.
2018-08-02 21:55:02 +02:00
Thomas Herzog b4d3f541e7 add 3D textures 2018-07-30 12:20:27 +02:00
karroffel b64171e79c add initial GLES2 3D renderer 2018-07-27 14:15:46 +02:00
Hein-Pieter van Braam 0e29f7974b Reduce unnecessary COW on Vector by make writing explicit
This commit makes operator[] on Vector const and adds a write proxy to it.  From
now on writes to Vectors need to happen through the .write proxy. So for
instance:

Vector<int> vec;
vec.push_back(10);
std::cout << vec[0] << std::endl;
vec.write[0] = 20;

Failing to use the .write proxy will cause a compilation error.

In addition COWable datatypes can now embed a CowData pointer to their data.
This means that String, CharString, and VMap no longer use or derive from
Vector.

_ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug
builds. This is a lot faster for Vector in the editor and while running tests.
The reason why this difference used to exist is because force-inlined methods
used to give a bad debugging experience. After extensive testing with modern
compilers this is no longer the case.
2018-07-26 00:54:16 +02:00
Rémi Verschelde e38051970c
Merge pull request #20448 from volzhs/duplicated-code
Remove duplicated codes
2018-07-25 22:20:47 +02:00
Rémi Verschelde 237148e80f
Merge pull request #18368 from Gamblify/RasterizerEngineSync
sync rasterizers with engine
2018-07-25 20:33:37 +02:00
volzhs 946be8be50 Remove duplicated codes 2018-07-25 23:34:25 +09:00
Marcin Zawiejski 2d05ae39a2 fix disappearing lines in visual script editor 2018-07-23 09:07:32 +02:00
Rémi Verschelde c579c48461
Merge pull request #20353 from dragmz/gles2_redundant
Remove redundant uniform set call
2018-07-22 16:20:23 +02:00
dragmz 00180ef264 remove redundant uniform set call 2018-07-22 15:42:43 +02:00
dragmz d2e909847d initialize texture shrink to false by default 2018-07-22 15:09:00 +02:00
Rémi Verschelde 00dfc9c8eb Shader lang: Properly assign INSTANCE_ID to gl_InstanceID
Note that gl_InstanceID is not supported in OpenGL ES 2.0,
so in the gles2 backend we assign it to 0.

Also clean up some duplicates/commented out code.
Fixes #20088.
2018-07-22 14:26:46 +02:00
Rémi Verschelde 7c9f7452f4 Style: Format code with clang-format 6.0.1 2018-07-18 16:27:03 +02:00
Max Hilbrunner 277793439a
Revert "Fix #19507 Not emitted particles affects performance" 2018-07-17 16:52:13 +02:00
Max Hilbrunner 4b626dc114
Merge pull request #19764 from malbach/godot_malbach
Fix #19507 Not emitted particles affects performance
2018-07-17 16:47:41 +02:00
Juan Linietsky de910f8c26 Finally figured out how to implement AnimatedTexture properly. 2018-07-16 11:43:49 -03:00
Max Hilbrunner 40f38216cf
Merge pull request #19707 from toger5/fix_clipping_vflip
fix clipping with v_flip fixes: #18600
2018-07-12 05:05:56 +02:00
Juan Linietsky 7dcaabaf19 Support for CPU based particles, which aids compatibility with OpenGL ES 2.0 2018-07-06 20:21:42 -03:00
Rémi Verschelde 8ce6444f59 Fix server build after 7fc23675 2018-07-03 13:53:00 +02:00