summaryrefslogtreecommitdiffstats
path: root/servers/rendering/renderer_viewport.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Improve handling of motion vectors for multimesh instances.Dario2023-08-091-0/+9
| | | | Fixes #67287. There was a subtle error where due to how enabling motion vectors for multi-meshes was handled, only the first instance would have a valid transforms buffer and the rest would point to an invalid buffer. This change moves over the responsibility of enabling motion vectors only when changes happen to the individual 3D transforms or the entire buffer itself. It also fixes an unnecessary download of the existing buffer that'd get overwritten by the current cache if it exists. Another fix is handling the case where the buffer was not set, and enabling motion vectors would not cause the buffer to be recreated correctly.
* Add option to enable HDR rendering in 2Dclayjohn2023-08-071-0/+11
| | | | | | | This is needed to allow 2D to fully make use of 3D effects (e.g. glow), and can be used to substantially improve quality of 2D rendering at the cost of performance Additionally, the 2D rendering pipeline is done in linear space (we skip linear_to_srgb conversion in 3D tonemapping) so the entire Viewport can be kept linear. This is necessary for proper HDR screen support in the future.
* Expose RenderingSceneBuffers through ClassDBBastiaan Olij2023-07-261-1/+13
|
* Add RENDERING_INFO parameters to GL Compatibility rendererclayjohn2023-06-161-1/+1
| | | | | | | | This also fixes RENDERING_INFO_TOTAL_PRIMITIVES_IN_FRAME for the RD renderers as it was incorrectly reporting vertex/index count at times This also adds memory tracking to textures and buffers to catch memory leaks. This also cleans up some memory leaks that the new system caught.
* Expose viewports render targer RIDBastiaan Olij2023-03-311-0/+7
|
* Use the original canvas to calculate light positioningAlon Ran2023-02-211-1/+1
|
* Merge pull request #73240 from myaaaaaaaaa/worker-hRémi Verschelde2023-02-131-0/+1
|\ | | | | | | Move some `worker_thread_pool.h` includes out of header files
| * Move some worker_thread_pool.h includes out of header filesmyaaaaaaaaa2023-02-131-0/+1
| |
* | Do clear request before reading from render target when using CANVAS_BGclayjohn2023-02-101-3/+12
| |
* | Fix crash in editor when setting `SubViewport.size` to zeroMarkus Sauermann2023-02-101-1/+1
|/ | | | | `Viewport::_set_size` now verifies, that the minimum size is at least 2x2. Also fix `RendererViewport::viewport_set_size` fail condition.
* Remove viewport_set_disable_environment in favor of ↵clayjohn2023-01-301-3/+13
| | | | | | viewport_set_environment_mode This allows us to set a default value inherited by child viewports and have child viewports set the value themselves which is needed for disabling the environment in the editor
* Warn when trying to enable TAA from mobile or gl_compatibility backendclayjohn2023-01-161-0/+1
| | | | TAA should only be enabled from the forward_plus renderer for now
* Improving communication of scaling settings to renderer implementationBastiaan Olij2023-01-131-34/+34
|
* One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
* Always try to clear render target before drawing 3D with Canvas BG modeclayjohn2023-01-031-3/+9
| | | | This is necessary to ensure that we aren't copying garbage data to the 3D renderbuffer
* Finish implementing Canvas Background modeclayjohn2022-11-171-0/+3
|
* Collapse three seperate texture storage methods into ↵David Snopek2022-11-031-6/+5
| | | | render_target_set_override()
* Merge pull request #52350 from BimDav/viewport_canvas_cullRémi Verschelde2022-11-021-1/+7
|\ | | | | | | Added Viewport canvas cull mask feature
| * Viewport canvas cull mask featureBimDav2022-10-311-1/+7
| | | | | | | | Co-authored-by: Valentin Zagura <puthre@gmail.com>
* | Changing timing of call to xr_interface->pre_draw_viewportBastiaan Olij2022-10-171-41/+45
|/
* Adding getters to RenderTarget and implementing override functionality for XRBastiaan Olij2022-10-051-4/+6
|
* Merge pull request #66780 from dsnopek/webxr-emulator-fixRémi Verschelde2022-10-041-3/+5
|\ | | | | | | Fix rendering in the WebXR emulator
| * Fix rendering in the WebXR emulatorDavid Snopek2022-10-021-3/+5
| |
* | Move cluster builder, sdfgi and gi structures to clustered renderer, move ↵Bastiaan Olij2022-10-041-4/+4
|/ | | | light and probe elements into storage and reorganise our render_scene method.
* Merge pull request #65541 from clayjohn/renderer-settingRémi Verschelde2022-09-201-1/+1
|\ | | | | | | Split rendering driver project setting into renderer_name and rendering_driver
| * Split rendering driver project setting into renderer_name and ↵clayjohn2022-09-191-1/+1
| | | | | | | | rendering_driver. To differentiate between a driver (e.g. Vulkan or D3D12) and a renderer (e.g. clustered or mobile renderer).
* | Fix XR rendering in 'opengl3' driver and expose true size via the Viewport nodeDavid Snopek2022-09-141-39/+36
|/
* Merge pull request #65579 from ZuBsPaCe/fix-viewport-sibling-orderRémi Verschelde2022-09-131-7/+10
|\ | | | | | | Sibling SubViewports must be rendered from top to bottom
| * Sibling SubViewports must be rendered from top to bottomZuBsPaCe2022-09-091-7/+10
| | | | | | | | | | Sibling SubViewports must be rendered in the same order as in the Scene Tree, from top to bottom. _sort_active_viewports() reversed their order. Fixes #65545
* | Fix multiwindow support in GLES3 for X11, Windows, and MacOS.clayjohn2022-09-121-1/+8
|/ | | | | | | Instead of updating all viewports, then blitting all viewports to the backbuffer, then swapping all buffers, we run through all viewports and render, blit, and swap backbuffer before going to the next viewport.
* Extracting render buffers and changing it to a more generic solutionBastiaan Olij2022-09-011-7/+12
|
* Merge pull request #63003 from Geometror/msaa-2dRémi Verschelde2022-08-301-4/+15
|\
| * Implement MSAA for 2D [Vulkan only]Hendrik Brucker2022-08-131-4/+15
| |
* | Merge pull request #63091 from MinusKube/editor-window-render-bugRémi Verschelde2022-08-231-6/+46
|\ \ | |/ |/|
| * Fix viewport sorting being wrong on parent/child relationMinusKube2022-08-101-6/+46
| |
* | Use negative mipmap LOD bias for sub-native bilinear 3D scaleHugo Locurcio2022-08-101-1/+5
| | | | | | | | | | | | This provides a benefit similar to FSR 1.0 (greater texture sharpness at the cost of some graininess at sub-native resolution scales), but without the added performance cost of FSR 1.0.
* | Allow changing mipmap LOD bias when FSR 1.0 scaling is not usedHugo Locurcio2022-07-281-3/+3
| | | | | | | | | | | | | | | | | | Mipmap LOD bias can be useful to improve the appearance of distant textures without increasing anisotropic filtering (or in situations where anisotropic filtering is not effective). `fsr_mipmap_bias` was renamed to `texture_mipmap_bias` accordingly. The property hint now allows for greater precision as well.
* | Remove ThreadWorkPool, replace by WorkerThreadPoolJuan Linietsky2022-07-251-1/+1
|/ | | | | The former needs to be allocated once per usage. The later is shared for all threads, which is more efficient. It can also be better debugged.
* Adding Variable Rate Shading support to GodotBastiaan Olij2022-07-171-0/+16
| | | | | Improve GI renderer and add VRS support Implement render device has_feature and move subgroup settings to limit_get
* Rename soft shadow quality project settings for easier searchingHugo Locurcio2022-07-131-2/+2
| | | | | | | | | | | | `rendering/quality/shadows` is now `rendering/quality/positional_shadow` to explicitly denote that the settings only affect positional light shadows, not directional light shadows. Shadow atlas settings now contain the word "atlas" for easier searching. Soft shadow quality settings were renamed to contain the word "filter". This makes the settings appear when searching for "filter" in the project settings dialog, like in Godot 3.x.
* Split dependency logicBastiaan Olij2022-06-281-4/+4
| | | | | | Split FOG Split visibility notifier Final cleanup of storage classes
* Implement Running Godot as Movie Writerreduz2022-06-211-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | * Allows running the game in "movie writer" mode. * It ensures entirely stable framerate, so your run can be saved stable and with proper sound (which is impossible if your CPU/GPU can't sustain doing this in real-time). * If disabling vsync, it can save movies faster than the game is run, but if you want to control the interaction it can get difficult. * Implements a simple, default MJPEG writer. This new features has two main use cases, which have high demand: * Saving game videos in high quality and ensuring the frame rate is *completely* stable, always. * Using Godot as a tool to make movies and animations (which is ideal if you want interaction, or creating them procedurally. No other software is as good for this). **Note**: This feature **IS NOT** for capturing real-time footage. Use something like OBS, SimpleScreenRecorder or FRAPS to achieve that, as they do a much better job at intercepting the compositor than Godot can probably do using Vulkan or OpenGL natively. If your game runs near real-time when capturing, you can still use this feature but it will play no sound (sound will be saved directly). Usage: $ godot --write-movie movie.avi [scene_file.tscn] Missing: * Options for configuring video writing via GLOBAL_DEF * UI Menu for launching with this mode from the editor. * Add to list of command line options. * Add a feature tag to override configurations when movie writing (fantastic for saving videos with highest quality settings).
* Initial TAA implementationjfons2022-06-071-2/+29
| | | | | | Initial TAA support based on the implementation in Spartan Engine. Motion vectors are correctly generated for camera and mesh movement, but there is no support for other things like particles or skeleton deformations.
* Add clipping, backbuffer, and CanvasGroups to 2D GLES3 rendererclayjohn2022-05-241-2/+2
| | | | As well as significant consequent cleanup in the RenderTarget, Texture, and Canvas renderer code
* Use range iterators for RBSet in most casesAaron Record2022-05-191-23/+23
|
* Replace most uses of Map by HashMapreduz2022-05-161-10/+10
| | | | | | | | | | | | * Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
* Fix warnings found by Emscripten 3.1.10Rémi Verschelde2022-05-101-17/+5
| | | | | Fix `-Wunused-but-set-variable`, `-Wunqualified-std-cast-call`, and `-Wliteral-range` warnings.
* Merge pull request #60627 from aaronfranke/rename-elementsRémi Verschelde2022-05-031-5/+5
|\ | | | | Rename Transform2D and Basis `elements` to `columns` and `rows` respectively
| * Rename Transform2D "elements" to "columns"Aaron Franke2022-04-291-5/+5
| |
* | Viewport would be cleared even when clear_mode was set to VIEWPORT_CLEAR_NEVERawsker2022-05-021-12/+8
|/