Commit graph

665 commits

Author SHA1 Message Date
clayjohn
4d6737ec73 Fix bugs introduced by IBL fixes 2019-11-20 22:54:44 -08:00
Rémi Verschelde
083d088de3
Merge pull request #33583 from qarmin/fix_overflows_unitialized
Fix some overflows and unitialized variables
2019-11-20 21:31:12 +01:00
Rafał Mikrut
99d8626f4a Fix some overflows and unitialized variables 2019-11-20 16:22:16 +01:00
Rémi Verschelde
3be6e76f22
Merge pull request #33668 from clayjohn/Fix_environment_mapping_issues
Fix issues with environment mapping
2019-11-20 08:45:53 +01:00
clayjohn
cd40154890 Fix issues with environment mapping 2019-11-19 22:30:48 -08:00
Rémi Verschelde
7a0228fbba
Merge pull request #33720 from BastiaanOlij/fix_gles2_rgb8
Need to use GL_RGB8 and GL_RGBA8 as the internal format for GLES2
2019-11-19 11:12:03 +01:00
Bastiaan Olij
15cd81dc69 Need to use GL_RGB8 and GL_RGBA8 as the internal format for GLES2 2019-11-19 20:57:18 +11:00
Rémi Verschelde
6536105af2
Merge pull request #33527 from clayjohn/GLES2-bufferdata_optimization
Improve glBufferSubData usage where safe
2019-11-19 09:36:30 +01:00
clayjohn
14b06fc207 Fix negative light flickering 2019-11-17 22:18:54 -08:00
clayjohn
1253a33423 Improve glBufferSubData usage where safe 2019-11-11 16:38:41 -08:00
Bastiaan Olij
4e2343160c Add special external MSAA modes for GLES2 Rift S/Quest and OpenXR optimisation 2019-11-11 21:02:06 +11:00
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