Commit graph

654 commits

Author SHA1 Message Date
Bastiaan Olij
add5eaca43 Make MSAA work with external texture 2019-11-08 23:27:48 +11:00
Bastiaan Olij
f7cba26a52 Revert "fix #33188 MSAA depth buffer not used for external texture"
This reverts commit 418b035dda.
2019-11-08 22:47:36 +11:00
Rémi Verschelde
a3ac7a94f0
Merge pull request #33291 from NeoSpark314/fix_#33188
fix #33188 MSAA depth buffer not used for external texture
2019-11-08 09:53:22 +01:00
Rémi Verschelde
47389c3a16 Partial revert of #32657, undoing line shifting by 0.5
As discussed in #32657, this can't be done here as lines can be used
with a canvas scale, and this breaks them.
A suggestion is to do the pixel shifting at matrix level instead.

Fixes #33393.
Fixes #33421.
2019-11-07 15:43:04 +01:00
Holger Dammertz
418b035dda fix #33188 MSAA depth buffer not used for external texture
When rendering to an external texture and MSAA was active (as happened
in the Oculus Mobile ARVR plugin) no MSAA was rendered as the correct
depth buffer and multisample texture target was not used.
This also fixes https://github.com/GodotVR/godot_oculus_mobile/issues/54
2019-11-04 20:14:52 +01:00
Rémi Verschelde
c1b0800784
Merge pull request #33278 from clayjohn/GLES2-depth-format
Fix depth format on Android in GLES2
2019-11-03 07:56:38 +01:00
clayjohn
bc32779542 Fix depth format on Android in GLES2 2019-11-02 21:58:30 -07:00
Yuri Roubinsky
6b7f8558d9 Removed switch operator from GLES2 shader back-end 2019-11-02 12:43:32 +03:00
clayjohn
033ae8a543 When framebuffer allocation fails for MSAA in GLES2 revert to normal without ERR_FAIL 2019-10-30 07:45:09 -07:00
Rémi Verschelde
63c5cd7eb8
Merge pull request #33104 from qarmin/fix_some_crashes
Fix some crashes and using null pointers
2019-10-28 08:37:59 +01:00
Rémi Verschelde
826ffc26c9
Merge pull request #33097 from clayjohn/GLES2-HTML-sampler_limit
Fixed using compressed textures and add work around for firefox webgl mesa sampler limit
2019-10-28 08:19:37 +01:00
Rafał Mikrut
e53e1c566a Fix some crashes and using null pointers 2019-10-28 08:07:29 +01:00
clayjohn
7b3d098b2b Fixed using compressed textures and add work around for firefox webgl mesa sampler limit 2019-10-27 23:53:52 -07:00
clayjohn
51db564811 use proper texture in Android MSAA 2019-10-27 16:50:15 -07:00
Rémi Verschelde
3eb8bd08ec
Merge pull request #32657 from ptrojahn/lines
Fix draw_rect
2019-10-26 23:09:24 +02:00
Rémi Verschelde
3556876c08
Merge pull request #33093 from clayjohn/GLES2-HTML-shadows
Fix shadow mapping with RGBA textures on html
2019-10-26 22:07:46 +02:00
clayjohn
6ec7686a0c Fix shadow mapping with RGBA textures on html 2019-10-26 10:17:22 -07:00
Rémi Verschelde
69003457b3 WebGL 2.0: Force decompressing non power-of-2 textures with repeat/mipmap
While OpenGL ES 3.0 and WebGL 2.0 both support non power-of-2 (NPOT)
textures in their specification, the situation seems to be less clear
about *compressed* NPOT textures using repeat or mipmap flags.

At least Chrome on Linux doesn't seem to support this combination,
and a variety of mobile hardware have similar limitations.

As a workaround, we force decompressing such textures when running on
WebGL 2.0, at the cost of loading time and memory usage.

Fixes #33058.
2019-10-25 13:01:10 +02:00
Paul Trojahn
bdaedb601c Fix draw_rect
OpenGL uses the diamond exit rule to rasterize lines. If we don't shift
the points down and to the right by 0.5, the line can sometimes miss a
pixel when it shouldn't. The final fragment of a line isn't drawn. By
drawing the lines clockwise, we can avoid a missing pixel in the rectangle.
See section 3.4.1 in the OpenGL 1.5 specification.
Fixes #32279
2019-10-11 10:26:53 +02:00
Rémi Verschelde
a39aeade5b
Merge pull request #32170 from puthre/ninepatch-fix
GLES2 & GLES3 Fixes ninepatch margins for high resolution textures.
2019-10-09 08:33:56 +02:00
Rémi Verschelde
234289de2b
Merge pull request #32613 from clayjohn/GLES2-canvas-bg-mode
Add canvas background mode to GLES2
2019-10-07 08:57:44 +02:00
clayjohn
77939c6e2e add canvas background mode to GLES2 2019-10-06 23:26:11 -07:00
clayjohn
cea1f13176 fix current issues with post-processing 2019-10-06 12:07:31 -07:00
Rémi Verschelde
0deccd4a65
Merge pull request #32510 from clayjohn/GLES2-fix-black-editor-and-crash
Remove glViewport call as it wasnt needed and caused crash GLES2
2019-10-03 08:16:19 +02:00
Rémi Verschelde
ce336e7e72
Merge pull request #32505 from clayjohn/GLES2-fix-probe-crash
Fix reflection probe crash in GLES2 with post-processing
2019-10-03 07:55:08 +02:00
clayjohn
a152816c52 remove glViewport call as it wasnt needed and caused crash 2019-10-02 20:21:41 -07:00
clayjohn
07fd9719bf Fix reflection probe crash in GLES2 with post-processing 2019-10-02 14:35:10 -07:00
Yuri Roubinsky
1472fca951 Removed unnecessary shader error log messages 2019-10-02 12:37:22 +03:00
clayjohn
afaa68628a updated defaults and documentation for GLES2 glow 2019-10-01 07:55:04 -07:00
clayjohn
82f63633d1 Implement DOF blur, Glow, and BCS in GLES2 2019-09-30 08:04:31 -07:00
Rémi Verschelde
823c3def72 Fix copyright headers and style issues 2019-09-24 11:52:06 +02:00
Rémi Verschelde
159470df08
Merge pull request #32275 from godotengine/skin_support
Added skin support and simplified APIs to override bone position + glTF 2.0 import fixes
2019-09-23 15:02:15 +02:00
Rémi Verschelde
7174677fc8
Merge pull request #32259 from NeoSpark314/fix_stereo_cubemap_gles2
fix gles2 broken panorama sky on oculus quest
2019-09-22 21:18:06 +02:00
Holger Dammertz
94b0240767 fix gles2 broken panorama sky on oculus quest
This fixes an issue that was fixed for gles3 in #31419 but not applied
to gles2. The fix consists of using a constant scale for cube_normal of -1.0
instead of -1000000. It results in broken panorama rendering on the
oculus quest (see https://github.com/GodotVR/godot_oculus_mobile/issues/29)
2019-09-22 18:53:38 +02:00
lawnjelly
f5365aa0e1 Fix GLES2 skinning where VERTEX_TEXTURE not supported
Although the backup USE_SKELETON_SOFTWARE skinning path is currently used when float texture is not supported, the default skinning path still fails when float texture is supported but GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS is 0, i.e. the device cannot read from texture during vertex shader. This PR adds the logic to activate the SKELETON_SOFTWARE path if either of these cases occur, preventing crashes on devices which have this combination of features.
2019-09-22 15:38:20 +01:00
Rémi Verschelde
28265fb526
Merge pull request #31202 from azagaya/light-data
Create shadow_vec for altering shadow computation
2019-09-19 20:03:04 +02:00
Juan Linietsky
d81ddaf33e Added skin support and simplified APIs to override bone position. 2019-09-18 19:46:32 -03:00
Valentin Zagura
6ee84f53a9 GLES2 Fixes for ninepatch margins when patch size is smaller than the patch texture resolution..
Scaled ninepatch margins in screen space to be relative of the ninepatch size when the patch size is smaller than the patch texture resolution.
2019-09-17 09:51:54 +01:00
Chaosus
1333ea2a2d Implement shader array support for varyings 2019-09-14 18:23:25 +03:00
azagaya
b835868067 Create shadow_vec for altering shadow computation
In 2.1 and 3.0, light_vec could be modified for altering shadow_computations.
But it broke shadows when rotating light. shadow_vec would do the same, but without breaking
shadows in rotated lights if not used.

Add inverse light transformation to shadow vec, so it's not affected when rotating lights;

Added usage define for shadow vec.

For shadow vec working properly when rotating a light, it's needed to multiply it by light_matrix normalized. Added usage define in order to don't do that if shadow_vec not used.
2019-09-06 13:55:49 -03:00
Rémi Verschelde
ebbf63a87c
Merge pull request #31746 from clayjohn/skip-vertex-transform-gles2
Fix skip_vertex_transform bug in GLES2 CPUParticles
2019-08-29 08:37:12 +02:00
clayjohn
97f66900bb Fix skip_vertex_transform bug in GLES2 CPUParticles 2019-08-28 11:57:33 -07:00
Rémi Verschelde
816ddd7817
Merge pull request #31556 from Chaosus/gles2_inverse
Implemented inverse shader function to GLES2
2019-08-26 13:52:03 +02:00
Yuri Roubinski
982becfa39 Fix hint range step for integer in shaders 2019-08-25 15:11:04 +03:00
Yuri Roubinski
4dda253ee0 Implements switch to shaders 2019-08-23 14:43:09 +03:00
Yuri Roubinski
4dcee2035a Implemented inverse shader function to GLES2 2019-08-22 08:22:49 +03:00
Rémi Verschelde
cce148b024
Merge pull request #31473 from Chaosus/shader_bug
Fix ternary operator shader compiler expression
2019-08-19 10:15:22 +02:00
Yuri Roubinski
9abf5578ee Fix ternary operator shader compiler expression 2019-08-19 08:40:54 +03:00
clayjohn
99de3906ba check if skeleton texture is already allocated before reallocating 2019-08-18 22:02:57 -07:00
Braden Bodily
71d71d55b5 Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in 'core/' and 'editor/'
Condensed some if and ERR statements. Added dots to end of error messages

Couldn't figure out EXPLAINC. These files gave me trouble: core/error_macros.h, core/io/file_access_buffered_fa.h (where is it?),
core/os/memory.cpp,
drivers/png/png_driver_common.cpp,
drivers/xaudio2/audio_driver_xaudio2.cpp (where is it?)
2019-08-17 12:33:15 +02:00