summaryrefslogtreecommitdiffstats
path: root/drivers/gles2
Commit message (Collapse)AuthorAgeFilesLines
* Remove obsolete GLES2 backend codeRémi Verschelde2020-08-1333-23502/+0
| | | | | | | | | | | This code currently isn't compiled (and cannot compile). We plan to re-add OpenGL ES-based renderer(s) in Godot 4.0 alongside Vulkan (probably ES 3.0, possibly also a low-end ES 2.0), but the code will be quite different so it's not relevant to keep this old Godot 3.2 code. The `drivers/gles2` code from the `3.2` branch can be used as a reference for a potential new implementation.
* Added 'fma' function to shader languageYuri Roubinsky2020-07-102-0/+22
|
* Fixed mesh data access errors in GLES2PouleyKetchoupp2020-07-091-4/+2
| | | | | 1. Removed errors in mesh_surface_get_array as it's supported now 2. More accurate errors in mesh_surface_get_blend_shapes
* Added const qualifier support for function arguments in shadersYuri Roubinsky2020-07-011-0/+3
|
* Fix shader's length() function parsing in expressionsYuri Roubinsky2020-06-032-5/+9
|
* Style: Enforce separation line between function definitionsRémi Verschelde2020-05-146-0/+23
| | | | | | | | | | | | | | | | | | | | | | | I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-1429-624/+0
| | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* Style: clang-format: Disable AllowShortCaseLabelsOnASingleLineRémi Verschelde2020-05-101-12/+24
| | | | Part of #33027.
* Style: clang-format: Disable AllowShortIfStatementsOnASingleLineRémi Verschelde2020-05-101-1/+2
| | | | | | | Part of #33027, also discussed in #29848. Enforcing the use of brackets even on single line statements would be preferred, but `clang-format` doesn't have this functionality yet.
* Improve shader time roll overPedro J. Estébanez2020-04-301-3/+2
| | | | | | - Resurrect it for GL ES 2 - Add it to the Vulkan rasterizer - Expose the setting from the `RenderingServer`, since it does not belong in any specific rasterizer
* Merge pull request #37795 from Chaosus/shader_fix_const_order2Rémi Verschelde2020-04-291-7/+8
|\ | | | | Fix shader constant sorting
| * Fix shader constant sortingYuri Roubinsky2020-04-111-7/+8
| |
* | Use proper depth buffer format for rgba shadowsclayjohn2020-04-201-1/+1
| |
* | Implement MSAAJuan Linietsky2020-04-121-1/+1
|/
* Avoid material rebinds when using skeletonsclayjohn2020-04-071-9/+9
|
* Replace NULL with nullptrlupoDharkael2020-04-0210-157/+157
|
* SCons: Format buildsystem files with psf/blackRémi Verschelde2020-03-302-21/+21
| | | | | | | | | | | | | | | | | | | | | Configured for a max line length of 120 characters. psf/black is very opinionated and purposely doesn't leave much room for configuration. The output is mostly OK so that should be fine for us, but some things worth noting: - Manually wrapped strings will be reflowed, so by using a line length of 120 for the sake of preserving readability for our long command calls, it also means that some manually wrapped strings are back on the same line and should be manually merged again. - Code generators using string concatenation extensively look awful, since black puts each operand on a single line. We need to refactor these generators to use more pythonic string formatting, for which many options are available (`%`, `format` or f-strings). - CI checks and a pre-commit hook will be added to ensure that future buildsystem changes are well-formatted.
* Renaming of servers for coherency.Juan Linietsky2020-03-2712-793/+793
| | | | | | | | | | VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
* Effective DisplayServer separation, rename X11 -> LinuxBSDJuan Linietsky2020-03-263-8/+8
|
* Working sky shader implementationclayjohn2020-03-212-10/+0
|
* Add shader based background modeBastiaan Olij2020-03-193-0/+12
|
* Style: Set clang-format Standard to Cpp11Rémi Verschelde2020-03-174-11/+11
| | | | | | | | | | For us, it practically only changes the fact that `A<A<int>>` is now used instead of the C++03 compatible `A<A<int> >`. Note: clang-format 10+ changed the `Standard` arguments to fully specified `c++11`, `c++14`, etc. versions, but we can't use `c++17` now if we want to preserve compatibility with clang-format 8 and 9. `Cpp11` is still supported as deprecated alias for `Latest`.
* Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky2020-02-251-2/+2
| | | | | | | | | | | | | | | | | | | | | - Renames PackedIntArray to PackedInt32Array. - Renames PackedFloatArray to PackedFloat32Array. - Adds PackedInt64Array and PackedFloat64Array. - Renames Variant::REAL to Variant::FLOAT for consistency. Packed arrays are for storing large amount of data and creating stuff like meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of memory. That said, many users requested the ability to have 64 bits packed arrays for their games, so this is just an optional added type. For Variant, the float datatype is always 64 bits, and exposed as `float`. We still have `real_t` which is the datatype that can change from 32 to 64 bits depending on a compile flag (not entirely working right now, but that's the idea). It affects math related datatypes and code only. Neither Variant nor PackedArray make use of real_t, which is only intended for math precision, so the term is removed from there to keep only float.
* PoolVector is gone, replaced by VectorJuan Linietsky2020-02-183-77/+76
| | | | | Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
* Remove obsolete GLES3 backendRémi Verschelde2020-02-132-111/+1
| | | | | | | | | | | | | | Due to the port to Vulkan and complete redesign of the rendering backend, the `drivers/gles3` code is no longer usable in this state and is not planned to be ported to the new architecture. The GLES2 backend is kept (while still disabled and non-working) as it will eventually be ported to serve as the low-end renderer for Godot 4.0. Some GLES3 features might be selectively ported to the updated GLES2 backend if there's a need for them, and extensions we can use for that. So long, OpenGL driver bugs!
* Merge pull request #36141 from Chaosus/shader_struct_member_arraysYuri Roubinsky2020-02-121-0/+30
|\ | | | | Added support for arrays as shader struct members
| * Added support for arrays as shader struct membersYuri Roubinsky2020-02-121-0/+30
| |
* | doc: Sync classref with current sourceRémi Verschelde2020-02-122-4/+4
|/ | | | | | | | Lots of internal API changes and some docstrings were lost in the conversion. I manually salvaged many of them but for all the rendering-related ones, an additional pass is needed. Added missing enum bindings in BaseMaterial3D and VisualServer.
* Implementation of 'struct' for shadersYuri Roubinsky2020-02-112-19/+66
|
* Fix code formatting issues and VS compilationRémi Verschelde2020-02-111-4/+4
| | | | | | | Also temporarily disable multicheck build so that we get a full build even when there are style issues on Vulkan. Fixes #33356.
* Rewritten StreamTexture for better code reuse, added basis universal supportJuan Linietsky2020-02-111-1/+1
|
* Custom material support seems complete.Juan Linietsky2020-02-113-3/+3
|
* basic 2D engine is more or less working with Vulkan, including editor.Juan Linietsky2020-02-112-2/+2
| | | | Still a lot to do
* A lot of progress with canvas rendering, still far from working.Juan Linietsky2020-02-113-7/+7
|
* Texture refactorJuan Linietsky2020-02-114-5/+5
| | | | | | | | -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
* Refactored RID/RID_Owner to always use O(1) allocation.Juan Linietsky2020-02-116-98/+99
| | | | | * Implements a growing chunked allocator * Removed redudant methods get and getptr, only getornull is supported now.
* Merge pull request #35142 from clayjohn/GLES2-add-3d-texturesRémi Verschelde2020-02-077-30/+249
|\ | | | | Add support for 3D textures to GLES2
| * Add support for 3D textures to GLES2clayjohn2020-01-317-30/+249
| |
* | Remove duplicate WARN_PRINT macro.Marcel Admiraal2020-02-051-1/+1
| |
* | Remove duplicate ERR_PRINT macro.Marcel Admiraal2020-02-053-4/+4
|/
* Fix shader crash if using multiple underscores in identifier namesYuri Roubinsky2020-01-311-1/+1
|
* Fix Softbody always spawns from world center [gles2]Eric Rybicki2020-01-241-0/+1
| | | | Fixes #35373
* Merge pull request #35406 from lawnjelly/ortho-shadowRémi Verschelde2020-01-221-4/+4
|\ | | | | Replace CameraMatrix::get_viewport_size with get_viewport_half_extents, shadow culling with ortho camera and other affected issues
| * Change CameraMatrix::get_viewport_size to get_viewport_half_extentslawnjelly2020-01-221-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Remove unused #if 0'ed codeRémi Verschelde2020-01-212-47/+9
|/
* Merge pull request #35215 from clayjohn/multimesh-errorRémi Verschelde2020-01-161-4/+4
|\ | | | | Add multimesh format max for proper error checking
| * Add multimesh format max for proper error checkingclayjohn2020-01-161-4/+4
| |
* | Gracefully handle 3D textures in GLES2clayjohn2020-01-161-4/+9
|/
* Disabled array initialization, const array and arr.length in shadersYuri Roubinsky2020-01-161-19/+0
|
* Merge pull request #35176 from clayjohn/csg-crashRémi Verschelde2020-01-161-1/+1
|\ | | | | Fix light related crashes