Commit graph

841 commits

Author SHA1 Message Date
Juan Linietsky
4aea9f74e6 Rewritten StreamTexture for better code reuse, added basis universal support 2020-02-11 12:02:36 +01:00
Juan Linietsky
920db604d2 Rewrote large part of rendering, omni and spot shadows now work. 2020-02-11 12:01:18 +01:00
Juan Linietsky
2d6a916835 Environment sky more or less working. 2020-02-11 12:01:05 +01:00
Juan Linietsky
0586e18449 Custom material support seems complete. 2020-02-11 11:53:29 +01:00
Juan Linietsky
8bbbb97336 Completed material/2D shader support (missing SCREEN_TEXTURE) 2020-02-11 11:53:29 +01:00
Juan Linietsky
1b4281b895 basic 2D engine is more or less working with Vulkan, including editor.
Still a lot to do
2020-02-11 11:53:27 +01:00
Juan Linietsky
9b0dd4f571 A lot of progress with canvas rendering, still far from working. 2020-02-11 11:53:27 +01:00
Juan Linietsky
3f335ce3d4 Texture refactor
-Texture renamed to Texture2D
-TextureLayered as base now inherits 2Darray, cubemap and cubemap array
-Removed all references to flags in textures (they will go in the shader)
-Texture3D gone for now (will come back later done properly)
-Create base rasterizer for RenderDevice, RasterizerRD
2020-02-11 11:53:26 +01:00
Juan Linietsky
4f163972bb Refactored RID/RID_Owner to always use O(1) allocation.
* Implements a growing chunked allocator
* Removed redudant methods get and getptr, only getornull is supported now.
2020-02-11 11:53:26 +01:00
Marcel Admiraal
f0db13502a Remove duplicate WARN_PRINT macro. 2020-02-05 11:13:24 +01:00
Marcel Admiraal
5af3b4ca27 Remove duplicate ERR_PRINT macro. 2020-02-05 11:13:24 +01:00
Yuri Roubinsky
15358b808b Fix shader crash if using multiple underscores in identifier names 2020-01-31 09:11:17 +03:00
clayjohn
eb5cb5d016 Add project setting for max irradiance size 2020-01-25 13:27:13 -08:00
clayjohn
3631a3cc9e Fix recently introduced crash in viewport size 2020-01-23 08:11:01 -08:00
Rémi Verschelde
37897dba80
Merge pull request #35406 from lawnjelly/ortho-shadow
Replace CameraMatrix::get_viewport_size with get_viewport_half_extents, shadow culling with ortho camera and other affected issues
2020-01-22 22:02:09 +01:00
lawnjelly
eaf8e5ce52 Change CameraMatrix::get_viewport_size to get_viewport_half_extents
Fixes #26637.
Fixes #19900.

The viewport_size returned by get_viewport_size was previously incorrect, being half the correct value. The function is renamed to get_viewport_half_extents, and now returns a Vector2.

Code which called this function has also been modified accordingly.

This PR also fixes shadow culling when using ortho cameras, because the correct input for CameraMatrix::set_orthogonal should be the full HEIGHT from get_viewport_half_extents, and not half the width.

It also fixes state.ubo_data.viewport_size in rasterizer_scene_gles3.cpp to be the width and the height of the viewport in pixels as stated in the documentation, rather than the current value which is half the viewport extents in worldspace, presumed to be a bug.
2020-01-22 18:22:00 +00:00
Rémi Verschelde
00284a75e8 GLES3: Fix invalid value for GL_TEXTURE_MAG_FILTER parameter
`GL_LINEAR_MIPMAP_LINEAR` can be used for `GL_TEXTURE_MIN_FILTER`,
but not for `GL_TEXTURE_MAG_FILTER`.

Cf. https://www.khronos.org/opengl/wiki/GLAPI/glTexParameter

Fixes #35436.
2020-01-22 15:18:56 +01:00
Rémi Verschelde
4faaf6089a Remove unused #if 0'ed code 2020-01-21 21:41:54 +01:00
Rémi Verschelde
90a224c6eb
Merge pull request #35310 from akien-mga/gles3-irradiance-small-optimization
GLES3: Slight optimization to irradiance compute
2020-01-19 18:55:51 +01:00
Rémi Verschelde
dc4db4ab45 GLES3: Slight optimization to irradiance compute
All the calculations leading up to `mipLevel` are only relevant for
Panorama mode. Similarly, the `source_resolution` uniform is only
needed for that mode.
2020-01-19 11:03:11 +01:00
clayjohn
0979411cad reduce complexity of irradiance map generation 2020-01-18 16:51:52 -08:00
clayjohn
041fa57a88 Add multimesh format max for proper error checking 2020-01-16 13:31:17 -08:00
clayjohn
f1d0c391c7 fix light related crashes 2020-01-15 21:40:05 -08:00
Rémi Verschelde
8130decfe4
Merge pull request #35064 from clayjohn/rendering_crashes
Fix light and multimesh crashes
2020-01-13 09:13:18 +01:00
clayjohn
179193775b Fix light and multimesh crashes 2020-01-12 17:45:06 -08:00
clayjohn
796d35d8b3 Fix generation of irradiance map 2020-01-12 14:45:31 -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
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
Rémi Verschelde
2d6586ec78
Merge pull request #34551 from MadEqua/fix-light-with-skeleton
Fix 2D lighting when using skeleton.
2020-01-03 08:32:29 +01:00
Tritium Oxide
bb6f04c9f5
Fix wrong return type
`ERROR: _display_error_with_code: CanvasShaderGLES3: Fragment Program Compilation Failed:
0:166(2): error: `return' with wrong type int, in function `map_ninepatch_axis' returning float`  caused by #34704
2020-01-01 19:14:51 +07:00
Rémi Verschelde
e4907e50fe GLES3: Fix false positive in ninepatch axis stretch code
See #34704.
2020-01-01 11:49:58 +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
Rémi Verschelde
a96c95f1ef
Merge pull request #34685 from winston-yallow/fix_omnilight_attenuation
Use correct omni light attenuation
2019-12-30 16:11:58 +01:00
Winston
c9fe11dec1
Use correct omni light attenuation
fixes godotengine/godot#34683
2019-12-29 17:22:34 +01:00
Bruno Lourenço
16429a4289 Reset GLES3 MultiMesh buffer id when reallocating. 2019-12-28 18:38:25 +00:00
Bruno Lourenço
65195f505f Fix canvas GLES3 skeleton transform uniform updating. 2019-12-23 18:40:48 +00:00
Bruno Lourenço
f26c9d650b Fix 2D lighting when using skeleton. 2019-12-23 00:00:18 +00:00
Rémi Verschelde
e21872f4b9
Merge pull request #34527 from MadEqua/fix-gles3-light-cutoff
Fix GLES3 light cutoff.
2019-12-21 23:40:15 +01:00
Bruno Lourenço
d47374385c Fix GLES3 light cutoff. 2019-12-21 20:52:54 +00:00
Bruno Lourenço
d7f9d71be2 Fix contact shadow when light is outside of viewport. 2019-12-21 16:55:41 +00: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
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
cd07a34598 GLES3: Properly unbind buffers after draw commands
Patch provided by @oeleo1.

Fixes #34120.
2019-12-09 09:25:20 +01:00
Rémi Verschelde
745a8915fc Properly orphan polygon index buffer after binding (take 2)
Follow-up to #34088, patch by @oeleo1 from
https://github.com/godotengine/godot/issues/34065#issuecomment-561530896
2019-12-04 12:16:50 +01:00
clayjohn
b2dfbd77ec properly orphan polygon index buffer after binding 2019-12-03 07:54:25 -08: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