summaryrefslogtreecommitdiffstats
path: root/core/math/camera_matrix.cpp
Commit message (Collapse)AuthorAgeFilesLines
* CameraMatrix: Pre-allocate Vector in get_projection_planes().Anilforextra2022-01-131-6/+7
|
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* clang-format: Disable alignment of operands, too unreliableRémi Verschelde2021-10-281-11/+11
| | | | | | | | | Sets `AlignOperands` to `DontAlign`. `clang-format` developers seem to mostly care about space-based indentation and every other version of clang-format breaks the bad mismatch of tabs and spaces that it seems to use for operand alignment. So it's better without, so that it respects our two-tabs `ContinuationIndentWidth`.
* Replace HTTP links with HTTPS for sites with HTTPS versionsAaron Franke2021-08-221-2/+2
|
* Rename Transform to Transform3D in coreAaron Franke2021-06-031-7/+7
|
* Merge pull request #37547 from aaronfranke/tauRémi Verschelde2021-02-011-2/+2
|\ | | | | Use Math_TAU and deg2rad/etc in more places and optimize code
| * Use Math_TAU and deg2rad/rad2deg in more places and optimize codeAaron Franke2021-01-091-2/+2
| |
* | Added GPU based cluster builderreduz2021-01-191-0/+9
|/ | | | Clustering is now GPU based, uses an implementation based on the Activision algorithm.
* Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
* Implement automatic LOD (Level of Detail)reduz2020-12-181-0/+11
| | | | | | | -Happens on import by default for all models -Just works (tm) -Biasing can be later adjusted per node or per viewport (as well as globally) -Disabled AABB.get_support test because its broken
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-1/+1
| | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* Added volumetric fog effect.Juan Linietsky2020-08-131-3/+2
|
* Style: Remove unnecessary semicolons from `core`Rémi Verschelde2020-05-191-9/+9
| | | | | | | | | | Semicolons are not necessary after function definitions or control flow blocks, and having some code use them makes things inconsistent (and occasionally can mess up `clang-format`'s formatting). Removing them is tedious work though, I had to do this manually (regex + manual review) as I couldn't find a tool for that. All other code folders would need to get the same treatment.
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-7/+14
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: Enforce separation line between function definitionsRémi Verschelde2020-05-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | 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-141-34/+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.
* New lightmapperJuan Linietsky2020-05-101-0/+16
| | | | | | | -Added LocalVector (needed it) -Added stb_rect_pack (It's pretty cool, we could probably use it for other stuff too) -Fixes and changes all around the place -Added library for 128 bits fixed point (required for Delaunay3D)
* Revert "Renamed plane's d to distance"Rémi Verschelde2020-05-101-6/+6
| | | | | | | This reverts commit ec7b481170dcd6a7b4cf0e6c1221e204ff7945f3. This was wrong, `d` is not a distance but the `d` constant in the parametric equation `ax + by + cz = d` describing the plane.
* Style: clang-format: Disable AllowShortIfStatementsOnASingleLineRémi Verschelde2020-05-101-3/+6
| | | | | | | 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.
* Renamed plane's d to distanceMarcus Elg2020-05-101-6/+6
|
* Fix aspect ratio on hmd projection matrixBastiaan Olij2020-04-051-1/+1
| | | | (cherry picked from commit a7438f0e61fca161b6324a230b8914e4f6c56b3f)
* Modified rendering to use cluster instead of fowardJuan Linietsky2020-02-111-0/+30
|
* Reflection probes workingJuan Linietsky2020-02-111-2/+2
|
* Rewrote large part of rendering, omni and spot shadows now work.Juan Linietsky2020-02-111-0/+22
|
* Yay very basic 3D (only white) finally shows.Juan Linietsky2020-02-111-0/+6
|
* Change CameraMatrix::get_viewport_size to get_viewport_half_extentslawnjelly2020-01-221-6/+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.
* Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | 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.
* Fix some overflows and unitialized variablesRafał Mikrut2019-11-201-0/+4
|
* Update some dead links in the codebaseMichael Alexsander Silva Dias2019-07-231-2/+2
|
* Remove unnecessary code and add some error explanationsqarmin2019-07-011-30/+30
|
* Add FRUSTUM camera mode, allowing tilted frustumsJFonS2019-02-191-0/+8
| | | | | | | This new camera mode makes it easy to create tilted frustums for mirror or portal effects. This work was kindly sponsored by IMVU.
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-2/+3
| | | | | | This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-051-0/+1
| | | | | | Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
* Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Forgot to apply oversampling to YBastiaan Olij2017-12-031-0/+1
|
* Rename Rect3 to AABB.Ferenc Arn2017-11-171-1/+1
| | | | Fixes #12973.
* Fixed Typo: 'Seperate' to 'Separate'Indah Sylvia2017-09-191-1/+1
|
* Fix unused variable warningsHein-Pieter van Braam2017-09-081-16/+13
| | | | The forth in my quest to make Godot 3.x compile with -Werror on GCC7
* Several fixes to directional shadows, closes #10926Juan Linietsky2017-09-071-64/+22
| | | | Added option to change directional light range mode, between optimized and stable. For Orthogonal, you might need to use optimized.
* Dead code tells no talesRémi Verschelde2017-08-271-14/+0
|
* Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-271-1/+1
|
* Adding base classes and structures for ARVR supportBastiaanOlij2017-07-281-13/+111
| | | | | | Added ArVrScriptInterface Added ARVRCamera, ARVRController and ARVROrigin helper objects
* renamed all Rect3.pos to Rect3.positionalexholly2017-06-091-2/+2
|
* renamed all Rect2.pos to Rect2.positionalexholly2017-06-041-2/+2
|
* Add "Godot Engine contributors" copyright lineRémi Verschelde2017-04-081-0/+1
|
* A Whole New World (clang-format edition)Rémi Verschelde2017-03-051-312/+281
| | | | | | | | | | | | | | | | | | | | | | | | I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
* Overloaded basic math funcs (double and float variants). Use real_t rather ↵Ferenc Arn2017-01-161-32/+32
| | | | | | than float or double in generic functions (core/math) whenever possible. Also inlined some more math functions.
* Fix compile errors related to audio on OSXBastiaanOlij2017-01-161-8/+8
|
* Style: Various fixes to play nice with clang-formatRémi Verschelde2017-01-161-13/+32
|