Commit graph

255 commits

Author SHA1 Message Date
BastiaanOlij 02ea99129e Adding a new Camera Server implementation to Godot.
This is a new singleton where camera sources such as webcams or cameras on a mobile phone can register themselves with the Server.
Other parts of Godot can interact with this to obtain images from the camera as textures.
This work includes additions to the Visual Server to use this functionality to present the camera image in the background. This is specifically targetted at AR applications.
2019-06-15 21:30:32 +10:00
qarmin 99ba021404 Fix invalid crash in mesh_add_surface 2019-06-09 14:49:59 +02:00
Rémi Verschelde c34636cbc4
Merge pull request #24943 from aqnuep/issue-18201
Mute errors on surface->index_array_len == 0 in the GLES3 renderer
2019-06-01 12:12:09 +02:00
clayjohn 4c55a909ad fix radiance map settings 2019-05-25 18:57:32 -07:00
clayjohn 65c211d303 Implement ability to render viewports directly to screen 2019-05-13 15:20:15 -07:00
Daniel Rakos e34eb5c26c Fix texture resource reload bug
If a non-imported texture resource file (e.g. DDS) gets updated the editor
doesn't reload it. The cause of the problem is two-fold:

First, the code of ImageTexture assumes that textures are always imported
from an image, but that's not the case for e.g. DDS. This change thus adds
code to issue a resource reload in case an image reload is not possible
(which is the case for non-imported texture resources).

Second, the code is filled with bogus calls to Image::get_image_data_size()
to determine the mipmap offset when that should be done using
Image::get_image_mipmap_offset(). Previous code literally passed the integer
mip level value to Image::get_image_data_size() where that actually expects
a boolean. Thus this part of the change might actually solve some other
issues as well.

To be pedantic, the texture_get_data() funciton of the rasterizer drivers is
still quite a mess, as it only ever returns the whole mipchain when
GLES_OVER_GL is set (practically only on desktop builds) but this change does
not attempt to resolve that.
2019-05-08 17:22:40 +02:00
Rémi Verschelde dd2cd06165
Merge pull request #25670 from aqnuep/bake_mode_affect_gi_prove
Disable GI probe capturing lights with bake mode disabled
2019-04-30 18:33:34 +02:00
Daniel Rakos de33ef2d1b Disable GI probe capturing lights with bake mode disabled
The bake mode property of lights previously didn't affect GI probes.
This change makes the GI probe ignore lights that have their bake mode
set to disabled.
2019-04-23 11:36:36 +02:00
Rémi Verschelde c8994b56f9 Style: Apply new changes from clang-format 8.0
It seems to stay compatible with formatting done by clang-format 6.0 and 7.0,
so contributors can keep using those versions for now (they will not undo those
changes).
2019-04-09 17:09:48 +02:00
Rémi Verschelde 4942e96897
Merge pull request #27527 from BastiaanOlij/render_ext_target
Add option to have viewport render into supplied texture (VR)
2019-04-07 11:11:50 +02:00
Rémi Verschelde b182e038e7 GLES3: Fix regression in particles buffer initialization
Bug introduced in #26343 where `(float *)` was mistakenly converted
to `(uint8_t *)`, so we were getting `2` instead of `8`.

Fixes #27705.
2019-04-06 21:01:51 +02:00
Bastiaan Olij 8349d4fbd9 Add option to have viewport render into supplied texture 2019-04-06 08:24:58 +11:00
K. S. Ernest (iFire) Lee e3ef7f214a Add Open Asset Import Library to Godot.
FBX support and MMD (pmx) support.

Normals, Albedo, Metallic, and Roughness through Arnold 5 Materials for Maya FBX.

Maya FBX Stingray PBS support.

Importing FBX static meshes work.

Importing FBX animations is a work in progress.

Supports FBX 4 bone influence animations.

Supports FBX blend shapes.

MMDs do not have an associated animation import yet.

Sponsored by IMVU Inc.
2019-04-05 07:17:52 -07:00
marxin e7f22ebdcd Enable warnings=extra on clang and GCC testers.
And remove 2 warnings from warnings=extra.
2019-04-02 17:14:47 +02:00
Daniel Rakos 849596c40c Fixed handling of depth texture so it's resolved and bound when needed
- Cleaned up and improved the code determining when we need to use a depth
  prepass (previously it wasn't executed in certain cases even if it was
  needed)
- Added code to prepare and bind the depth texture even when no depth prepass
  or MRTs (more precisely effect buffers) are used

Fixes #25870, #25535, and #25387.
2019-03-26 17:48:22 +01:00
Juan Linietsky 6cb841edcb Ensure ETC2 textures are ALSO compressed to Po2 when have mipmaps. Fixes #26733 2019-03-07 12:16:20 -03:00
Juan Linietsky 53bec9deeb Fix and restore text, material and mesh previewers. 2019-03-04 15:53:18 -03:00
Daniel Rakos 582f62c2b2 Fixed TextureArray and Texture3D issues
- Texture arrays and 3D textures weren't working previously due to an
  incorrect number of calls to glTexImage3D with incorrect level parameters.
  This change fixes that.
- Fixed the incorrect calculation of the byte size of layered textures.
- Added the layer count to the debugger info when viewing video memory usage.
2019-03-03 16:40:48 +01:00
Juan Linietsky 2f32a75d2e Skeletons can now choose between using local or world coords for processing, fixes #26468 2019-03-03 12:24:00 -03:00
Juan Linietsky 3f681b0681 Clean up blend shape support in GLES2 and GLES3. 2019-03-01 16:01:44 -03:00
Juan Linietsky a32b26dfa2 Several fixes to make GLES2 on HTML5 work much better.
Changed math class error reporting to be a bit less paranoid.
2019-02-25 21:47:29 -03:00
Juan Linietsky 16e67388a2 Properly update materials when adding surface, fixes #23790 2019-02-22 16:27:00 -03:00
marxin 8d51618949 Add -Wshadow=local to warnings and fix reported issues.
Fixes #25316.
2019-02-20 19:44:12 +01:00
Juan Linietsky d6a88bbc30 Remove all references to stencil, fixes problems on iOS. 2019-02-13 07:58:52 -03:00
Juan Linietsky 4f72ff4f1c On mobile, check for float and half float frameuffers supported, fixes #25324, fixes #25325. 2019-02-13 07:14:36 -03:00
Konrad Nowakowski a0bdd9605a Fix polygon drawing on WebGL1 2019-01-27 23:09:18 +00:00
Juan Linietsky 0c60d4c682 Properly get proxy texture size for canvas light, fixes #17067 2019-01-27 16:57:05 -03:00
Juan Linietsky 18c3ed245a Further fixes to avoid memory corruption, closes #25336 2019-01-26 10:47:04 -03:00
Juan Linietsky 42764ed252
Revert "Fix errors on iOS" 2019-01-24 17:15:52 -03:00
Rémi Verschelde 148e62102b
Merge pull request #25257 from karroffel/tex3d-get-data-fix
implemented texture_get_data() for TextureLayered
2019-01-24 16:19:21 +01:00
thomas.herzog dddfe9a2df implemented texture_get_data() for TextureLayered 2019-01-23 16:12:29 +01:00
Bastiaan Olij cab45f2f26 Fix errors on iOS 2019-01-23 13:38:19 +11:00
Emanuele Fornara e1be09d8fd Fix enum scope 2019-01-17 20:29:01 +01:00
Daniel Rakos 1dd98baaa6 Mute errors on surface->index_array_len == 0 in the GLES3 renderer
This error is generated whenever rendering collision debug meshes.
There's no reason why this should be treated as an error as index-less
meshes are supported and used across the engine.
2019-01-13 11:46:40 +01:00
Rémi Verschelde d8f0087dc8
Merge pull request #24568 from Shinryuuji/fix-wrong-texture-array-target
Fix wrong default target for sampler2DArray
2019-01-04 16:14:29 +01:00
Rémi Verschelde 99c4faf837
Merge pull request #24575 from nekomatata/android-curve-texture
Fixed CurveTexture with GLES3 on Android
2019-01-04 15:31:08 +01:00
Rémi Verschelde b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
PouleyKetchoupp a1160ff8e7 Fixed CurveTexture with GLES3 on Android 2018-12-30 19:49:55 +01:00
Bastiaan Olij 9055386de9 Fix texture type not being initialised 2018-12-29 23:44:28 +11:00
Shinryuuji 7bfddbec3a Fix wrong default target for sampler2DArray 2018-12-23 15:25:46 +01:00
Leon Krause 93bed8cf57 Check for WebGL RGTC extension 2018-11-28 11:12:26 +01:00
Rémi Verschelde 296834955f Remove debug print in RasterizerStorageGLES3 2018-11-20 07:58:26 +01:00
Juan Linietsky d304228003 Do not draw particles if they are not processing at all, fixes #19507 2018-11-19 20:34:29 -03:00
Juan Linietsky 634aa4fc24 Ensure bone AABBs are properly transformed to affect mesh AABB, fixes #19281 2018-11-19 10:43:29 -03:00
JFonS fb92c7b0fa Use hint_color when getting shader default params 2018-11-16 12:20:23 +01:00
Juan Linietsky 4d88721e62 Do not error on empty shader, just treat it as invalid by default. Fixes #15998. 2018-11-14 10:58:16 -03:00
Juan Linietsky 984063cf0b Cleaned up and fixed the base_changed function in rasterizers, also fixes #15617 2018-11-14 09:32:39 -03:00
Wilson E. Alvarez e4884cfc75
Simplified boolean logic in GLES2/3 rasterizers 2018-11-04 09:14:50 +00:00
Juan Linietsky 9c195b57a0
Merge pull request #23125 from JFonS/fix_texture_get_data
Implement rasterizer texture_get_data on OpenGL ES
2018-11-01 12:56:31 -03:00
JFonS edcccaf8c1 Implement rasterizer texture_get_data on OpenGL ES 2018-11-01 11:30:49 +01:00