summaryrefslogtreecommitdiffstats
path: root/servers/rendering_server.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Handle 32-bit and 64-bit floats for tangents/weights in RenderingServerAaron Franke2021-08-011-30/+55
|
* Expose Vulkan's clustered and mobile backends in the project managerHugo Locurcio2021-07-301-3/+3
| | | | | | | | | | | | | | | | Since OpenGL will not be available in Godot 4.0, this exposes a choice between Vulkan clustered and Vulkan mobile in the project manager. Despite the name, Vulkan mobile has many benefits on desktop platforms. It provides better performance on simple scenes, and ensures that you won't accidentally use unsupported features while testing your project on desktop platforms. The Vulkan backend setting was made into a "basic" setting so that it can be changed without having to enable the Advanced Settings toggle. This also improves list formatting to use bullet points and tweaks the property hint to be more descriptive.
* Use const references where possible for List range iteratorsRémi Verschelde2021-07-251-1/+1
|
* Use C++ iterators for Lists in many situationsAaron Franke2021-07-231-11/+11
|
* Merge pull request #50618 from reduz/implement-more-specialization-constantsRémi Verschelde2021-07-201-0/+21
|\ | | | | Implement more rendering options as specialization constants
| * Implement more rendering options as specialization constantsreduz2021-07-191-0/+21
| | | | | | | | | | | | | | | | * Shadow quality settings now specialization constant. * Decal and light projector filters can be set. * Changing those settings forces re-creation of the pipelines. These changes should help improve performance related to shadow mapping, and allows improving performance by sacrificing decal and light projector quality.
* | Explicitly cast to float when creating a float arrayAaron Franke2021-07-191-4/+4
|/
* Fix warning message spam when a VoxelGI node is selected in the editorHugo Locurcio2021-07-061-1/+0
| | | | | Support for anisotropy in VoxelGI was removed during its development due to the high cost. This was a leftover from anisotropy support.
* Fix Render Inforeduz2021-07-031-16/+13
| | | | | | | | * Fixed and redone the process to obtain render information from a viewport * Some stats, such as material changes are too difficult to guess on Vulkan, were removed. * Separated visible and shadow stats, which causes confusion. * Texture, buffer and general video memory can be queried now. * Fixed the performance metrics too.
* Remove leftovers from the DirectionalLight3D Optimized shadow depth rangeHugo Locurcio2021-07-021-4/+0
| | | | | | The Optimized shadow depth range was removed in late 2020 in favor of the Stable shadow depth range, but it still had a (broken) property that allowed to enable it.
* Merge pull request #50040 from reduz/fix-renderingserver-bindingsRémi Verschelde2021-07-011-392/+859
|\ | | | | Clean up RenderingServer and its bindings
| * Clean up RenderingServer and its bindingsreduz2021-07-011-392/+859
| | | | | | | | | | | | * Rewrote bindings for RenderingServer. * They are now all up to date. * Several unused methods and deprecated features were cleaned up.
* | Import mesh colors in 8BPP.reduz2021-06-301-9/+11
|/ | | | | | | | * Colors were imported as 16BPP (half float) * Far most common use cases only require 8BPP * If you need higher data precision, use a custom array, which are supported now. **WARNING**: 3D Scenes imported in 4.0 no longer compatible with this new format. You need to re-import them (erase them from .godot/import)
* Deprecate ImmediateGeometryreduz2021-06-301-21/+1
| | | | | | | | | * Removed entirely from RenderingServer. * Replaced by ImmediateMesh resource. * ImmediateMesh replaces ImmediateGeometry, but could use more optimization in the future. * Sprite3D and AnimatedSprite3D work again, ported from Godot 3.x (though a lot of work was needed to adapt them to Godot 4). * RootMotionView works again. * Polygon3D editor works again.
* Implement visibility range and dependencies.jfons2021-06-141-2/+2
| | | | | | | | | | | | | | | | | | | | | This commit adds the following properties to GeometryInstance3D: `visibility_range_begin`, `visibility_range_begin_margin`, `visibility_range_end`, `visibility_range_end_margin`. Together they define a range in which the GeometryInstance3D will be visible from the camera, taking hysteresis into account for state changes. A begin or end value of 0 will be ignored, so the visibility range can be open-ended in both directions. This commit also adds the `visibility_parent` property to 'Node3D'. Which defines the visibility parents of the node and its subtree (until another parent is defined). Visual instances with a visibility parent will only be visible when the parent, and all of its ancestors recursively, are hidden because they are closer to the camera than their respective `visibility_range_begin` thresholds. Combining visibility ranges and visibility parents users can set-up a quick HLOD system that shows high detail meshes when close (i.e buildings, trees) and merged low detail meshes for far away groups (i.e. cities, woods).
* Add stereoscopic rendering through multiviewBastiaan Olij2021-06-131-0/+2
|
* Merge pull request #47835 from mortarroad/master-lossless-webpRémi Verschelde2021-06-111-0/+4
|\ | | | | Implement lossless WebP encoding
| * Implement lossless WebP encodingMorris Tabor2021-06-111-0/+4
| |
* | Fix tangent importingreduz2021-06-111-1/+3
| | | | | | | | * Binormal compression was wrong.
* | Rename GI Classesreduz2021-06-051-31/+31
|/ | | | | | | * GIProbe is now VoxelGI * BakedLightmap is now LightmapGI As godot adds more ways to provide GI (as an example, SDFGI in 4.0), the different techniques (which have different pros/cons) need to be properly named to avoid confusion.
* Implement shader cachingreduz2021-05-311-0/+6
| | | | | | | | | | | | * Shader compilation is now cached. Subsequent loads take less than a millisecond. * Improved game, editor and project manager startup time. * Editor uses .godot/shader_cache to store shaders. * Game uses user://shader_cache * Project manager uses $config_dir/shader_cache * Options to tweak shader caching in project settings. * Editor path configuration moved from EditorSettings to new class, EditorPaths, so it can be available early on (before shaders are compiled). * Reworked ShaderCompilerRD to ensure deterministic shader code creation (else shader may change and cache will be invalidated). * Added shader compression with SMOLV: https://github.com/aras-p/smol-v
* Fix typos with codespellRémi Verschelde2021-05-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using codespell 2.0.0. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang curvelinear dof doubleclick fave findn GIRD leapyear lod merchantibility nd numer ois ony que seeked synching te uint unselect webp EOF $ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po" $ git diff // undo unwanted changes ```
* Fixes missng 2D engine bitsreduz2021-05-111-0/+2
| | | | | | | | | | -Mesh2D now works -MultiMesh2D now works -Polygon2D now works -Added hooks for processing 2D particles -Skeleton2D now works 2D particles still not working, but stuff needed for it is now implemented.
* Assorted fixes to UV unwrapping and GPU lightmapperjfons2021-05-031-2/+2
| | | | | | | | | | | | | | | | | | | | Various fixes to UV2 unwrapping and the GPU lightmapper. Listed here for context in case of git blame/bisect: * Fix UV2 unwrapping on import, also cleaned up the unwrap cache code. * Fix saving of RGBA images in EXR format. * Fixes to the GPU lightmapper: - Added padding between atlas elements, avoids bleeding. - Remove old SDF generation code. - Fix baked attenuation for Omni/Spot lights. - Fix baking of material properties onto UV2 (wireframe was wrongly used before). - Disable statically baked lights for objects that have a lightmap texture to avoid applying the same light twice. - Fix lightmap pairing in RendererSceneCull. - Fix UV2 array generated from `RenderingServer::mesh_surface_get_arrays()`. - Port autoexposure fix for OIDN from 3.x. - Save debug textures as EXR when using floating point format.
* Create mobile rendererBastiaan Olij2021-05-031-2/+6
|
* fix-tangents-on-rendering-serverStefan Boronczyk2021-05-011-1/+1
|
* Merge pull request #48239 from akien-mga/goodbye-copymemRémi Verschelde2021-04-281-16/+16
|\ | | | | Core: Drop custom `copymem`/`zeromem` defines
| * Core: Drop custom `copymem`/`zeromem` definesRémi Verschelde2021-04-271-16/+16
| | | | | | | | | | | | | | | | We've been using standard C library functions `memcpy`/`memset` for these since 2016 with 67f65f66391327b2967a20a89c3627e1dd6e84eb. There was still the possibility for third-party platform ports to override the definitions with a custom header, but this doesn't seem useful anymore.
* | Implement occlusion cullingjfons2021-04-231-1/+20
|/ | | | | | | | | Added an occlusion culling system with support for static occluder meshes. It can be enabled via `Project Settings > Rendering > Occlusion Culling > Use Occlusion Culling`. Occluders are defined via the new `Occluder3D` resource and instanced using the new `OccluderInstance3D` node. The occluders can also be automatically baked from a scene using the built-in editor plugin.
* Rename get_surface_material to get_surface_override_materialclayjohn2021-04-141-1/+1
|
* Reorganize Project Settingsreduz2021-02-181-120/+120
| | | | | | | -Advanced Settings toggle also hides advanced properties when disabled -Simplified Advanced Bar (errors were just plain redundant) -Reorganized rendering quality settings. -Reorganized miscelaneous settings for clean up.
* Make Servers truly Thread Safereduz2021-02-101-2/+2
| | | | | | | | | -Rendering server now uses a split RID allocate/initialize internally, this allows generating RIDs immediately but initialization to happen later on the proper thread (as rendering APIs generally requiere to call on the right thread). -RenderingServerWrapMT is no more, multithreading is done in RenderingServerDefault. -Some functions like texture or mesh creation, when renderer supports it, can register and return immediately (so no waiting for server API to flush, and saving staging and command buffer memory). -3D physics server changed to be made multithread friendly. -Added PhysicsServer3DWrapMT to use 3D physics server from multiple threads. -Disablet Bullet (too much effort to make multithread friendly, this needs to be fixed eventually).
* Simplify Volumetric Fogreduz2021-02-061-5/+1
| | | | | | | -Always use temporal reproject, it just loos way better than any other filter. -By always using termporal reproject, the shadowmap reduction can be done away with, massively improving performance. -Disadvantage of temporal reproject is update latency so.. -Made sure a gaussian filter runs in XY after fog, this allows to keep stability and lower latency.
* Merge pull request #37547 from aaronfranke/tauRémi Verschelde2021-02-011-4/+6
|\ | | | | 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-4/+6
| |
* | Shadow map rendering optimizationreduz2021-01-241-13/+2
| | | | | | | | | | | | | | -All shadow rendering is done with raster now (no compute) -All shadow rendering is done by rendering directly to the shadow atlas -Improved how buffer clearing is done to optimize the above. -Ability to set shadows as 16 bits.
* | Several GI related optimizations and fixesreduz2021-01-241-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | -SDFGI direct light is done over many frames -SDFGI Changed settings for rays/frame -SDFGI Misc optimizations -SDFGI Bug fix on probe scroll -GIProbe was not working, got it to work again -GIProbe dynamic objects were not working, fixed -Added a half size GI option.
* | Added GPU based cluster builderreduz2021-01-191-0/+3
|/ | | | Clustering is now GPU based, uses an implementation based on the Activision algorithm.
* Threaded optimizations to cull and renderreduz2021-01-051-0/+7
| | | | | -Reorganize thread work pool for rendering -Fixes to make secondary command buffers to work (disabled because they need more testing)
* 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 🎆
* Expose gltf2 eight weights.K. S. Ernest (iFire) Lee2020-12-291-1/+15
|
* Merge pull request #44641 from reduz/get-frame-setup-timeRémi Verschelde2020-12-241-0/+3
|\ | | | | Add API to get frame setup time on CPU
| * Add API to get frame setup time on CPUreduz2020-12-241-0/+3
| | | | | | | | Needed for benchmarks
* | Merge pull request #44623 from reduz/rewrite-renderer-indexerJuan Linietsky2020-12-241-0/+3
|\ \ | |/ |/| Replace Octree by DynamicBVH in cull code
| * Replace Octree by DynamicBVH in cull codereduz2020-12-231-0/+3
| | | | | | | | | | | | -Much greater pairing/unpairing performance -For now, using it for culling too, but this will change in a couple of days. -Added a paged allocator, to efficiently alloc/free some types of objects.
* | Bind viewport measure functionsreduz2020-12-231-0/+4
|/
* Port ASSAO to Godot to replace SAOclayjohn2020-12-211-8/+13
|
* Reimplement skeletons and blend shapesreduz2020-12-161-7/+8
| | | | Uses compute shaders, which only once, on demand, and all in parallel.
* Cleanup unused engine codeTomasz Chabora2020-12-091-9/+0
|
* Add support for low-end 3D rendering.reduz2020-12-071-0/+3
| | | | | -Reduce number of uniform sets from 6 to 4. -Remove features in low end mode, in order to reduce the number of texture units fit to 16.