Commit graph

691 commits

Author SHA1 Message Date
clayjohn 179193775b Fix light and multimesh crashes 2020-01-12 17:45:06 -08:00
Rémi Verschelde 815bf761a5 RasterizerCanvas: Use getornull to fetch light occluder polygon
Fixes #21286 when the occluder is not fully configured.
2020-01-08 11:29:15 +01:00
Hugo Locurcio 0cad2c0cd1
Add VisualServer methods to get the video adapter name and vendor
These methods can be used in scripts to retrieve the OpenGL
`GL_RENDERER` and `GL_VENDOR` strings (respectively).

This closes #28404.
2020-01-06 00:37:56 +01:00
Rémi Verschelde 94658de1ff
Merge pull request #34794 from clayjohn/GLES2-trimesh-crash
Fix crash on trimesh_create
2020-01-03 22:53:57 +01:00
clayjohn 906b5e7f3f Fix crash on trimesh_create by making surface->data available in non-tool builds 2020-01-03 13:39:40 -08:00
Rémi Verschelde fa82664419
Merge pull request #34726 from nekomatata/polygon2d-antialiasing-fix
Fixed antialiasing option for Polygon2D with concave/hollow shapes
2020-01-03 14:17:05 +01:00
PouleyKetchoupp 1591677eb8 Fixed antialiasing option for Polygon2D
Some cases were not handled properly for Polygon2D after making changes in common code to fix Line2D antialiasing. Added an option for drawing polygons to differentiate the two use cases.

Fixes #34568
2020-01-01 11:40:14 +01:00
Rémi Verschelde a7f49ac9a1 Update copyright statements to 2020
Happy new year to the wonderful Godot community!

We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.

Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
2020-01-01 11:16:22 +01:00
clayjohn 28543667fd Always use 16 bit renderbuffer depth on WebGL 2019-12-19 20:41:32 -08:00
clayjohn 2a694a44cb fix shadow color in GLES2 by making sRGB 2019-12-15 10:27:31 -08:00
Rémi Verschelde 371de5132c
Merge pull request #34251 from bojidar-bg/32993-lightoccluder-flip
Flip cull mode when rendering flipped Light2D and LightOccluder2D
2019-12-12 07:33:19 +01:00
Rémi Verschelde f676d7509e
Merge pull request #34262 from clayjohn/default_point_size
Add a default POINT_SIZE
2019-12-12 06:45:31 +01:00
Bojidar Marinov eec7702711
Flip cull mode when rendering flipped Light2D and LightOccluder2D
Fixes #32993
2019-12-11 23:28:35 +02:00
clayjohn 676f647c74 Add a default POINT_SIZE 2019-12-10 23:08:20 -08:00
Rémi Verschelde 435cced7d8
Merge pull request #34238 from clayjohn/GLES2-use-renderbuffer-post-process
Use renderbuffer depth for post-process buffers when appropriate
2019-12-10 17:16:40 +01:00
clayjohn fd31cebcbe Use renderbuffer depth for post-process buffers when appropriate 2019-12-09 22:19:11 -08:00
clayjohn e8d652f160 Force 32 bit depth buffer for WebGL 2019-12-09 22:14:12 -08:00
Rémi Verschelde fbfd56c247 GLES2: Fix uninitialized members in ShaderGLES2::Version
Fixes #34109.
2019-12-05 09:15:31 +01:00
Rémi Verschelde 10bae7c05b
Merge pull request #33857 from nekomatata/polygon-2d-antialiasing
Fixed antialiased option for Polygon2D
2019-12-03 07:51:16 +01:00
Rémi Verschelde 65e6efaa3b
Merge pull request #33836 from clayjohn/blinn-fix
Fix Specular Blinn function
2019-12-03 07:50:37 +01:00
PouleyKetchoupp f5e81b894a Removed duplicated conditional in GLES2 2019-11-29 06:32:55 +01:00
PouleyKetchoupp e6ebc43d72 Fixed antialiased option for Polygon2D / Line2D
Polygon2D:
The property wasn't used anymore after switching from canvas_item_add_polygon() to canvas_item_add_triangle_array() for drawing.

Line2D:
Added the same property as for Polygon2D & fixed smooth line drawing to use indices correctly.

Fixes #26823
2019-11-28 22:57:27 +01:00
George Marques c51fe7f7cd
Use ANGLE multisample extensions for UWP 2019-11-26 13:55:19 -03:00
clayjohn 5ab3b61520 Restructure depth_internalformat code to work on mobile
This changes the code path so that `glRenderBufferStorage*` always uses
values appropriate for renderbuffers and `glTexImage2D` never uses an
internalformat meant for buffers.

Fixes #33825.
2019-11-23 18:08:19 -08:00
Rémi Verschelde bb1d75f55e glTexImage2D: Fix confusion between format and internal format
The `format` parameter is similar to `internalFormat` but takes different
values, and especially only `GL_DEPTH_COMPONENT` for depth, without size
specifier.

Cf. https://www.khronos.org/registry/OpenGL-Refpages/es3.0/html/glTexImage2D.xhtml

Fixes a regression from #33278 and another occurrence.
2019-11-23 19:38:31 +01:00
clayjohn 334d41d7cc Fix Specular Blinn function 2019-11-22 22:03:26 -08:00
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