Commit graph

75 commits

Author SHA1 Message Date
Rémi Verschelde
bfd0afca58
Merge pull request #55656 from clayjohn/GLSL3-compiler 2022-01-12 11:33:48 +01:00
clayjohn
99064d57db New OpenGL batching canvas renderer 2022-01-11 22:26:18 -08:00
Anilforextra
6c3a0460a8 Use List Initializations for Vectors. 2022-01-12 10:15:12 +05:45
Fernando Cosentino
ca79373d13
Added material_overlay property to MeshInstance3D
Applying overlay materials into multi-surface meshes currently
requires adding a next pass material to all the surfaces, which
might be cumbersome when the material is to be applied to a range
of different geometries. This also makes it not trivial to use
AnimationPlayer to control the material in case of visual effects.
The material_override property is not an option as it works
replacing the active material for the surfaces, not adding a new pass.

This commit adds the material_overlay property to GeometryInstance3D
(and therefore MeshInstance3D), having the same reach as
material_override (that is, all surfaces) but adding a new material
pass on top of the active materials, instead of replacing them.
2022-01-05 11:47:51 +01:00
Rémi Verschelde
c7bbb3a621
Merge pull request #56278 from GanidhuAbey/dof_msaa_bug 2022-01-05 10:47:27 +01:00
Rémi Verschelde
3a5a3473be
Merge pull request #54791 from NHodgesVFX/master
[4.x] add more OpenGL attributes
2022-01-04 16:52:27 +01:00
Rémi Verschelde
851fb16350
Merge pull request #56305 from Calinou/rename-lod-threshold 2022-01-04 15:28:06 +01:00
Rémi Verschelde
ff211c8e5a
Merge pull request #55386 from Calinou/allow-disable-depth-prepass 2022-01-04 15:25:11 +01:00
Rémi Verschelde
7f66c16c03
Merge pull request #51206 from clayjohn/Vulkan-ASSGI 2022-01-04 10:00:17 +01:00
Rémi Verschelde
fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
Hugo Locurcio
df09bc38cb
Rename Lod Threshold to Mesh Lod Threshold
This makes it more obvious that the setting only affects mesh LOD,
not manual (H)LOD achieved using visibility ranges.
2021-12-29 00:11:50 +01:00
GanidhuAbey
133486bfba fixed depth of field bug with msaa 2021-12-26 23:13:47 -08:00
Nathan Franke
49403cbfa0
Replace String comparisons with "", String() to is_empty()
Also:
- Adds two stress tests to test_string.h
- Changes to .empty() on std::strings
2021-12-09 04:48:38 -06:00
Hugo Locurcio
989a7d9270
Allow disabling the depth prepass in the Vulkan Clustered backend
In scenes that have little to no overdraw, disabling the depth prepass
can give a small performance boost. Nonetheless, in most other scenarios,
the depth prepass should be left enabled as it improves performance
significantly.
2021-11-27 17:54:45 +01:00
Je06jm
20deb0917d Implemented AMD's FSR as a computer shader for upscaling 3D scenes 2021-11-23 14:16:03 -07:00
jfons
4c4b6620a0 Fix Depth-Prepass transparency mode
Add mising bits of implementation and ensure depth-prepass objects are
only rendered in the transparency pass.
2021-11-18 12:49:46 +01:00
Rémi Verschelde
c30aa372ca
Merge pull request #55029 from clayjohn/VULKAN-SRGB
Add SHADER_IS_SRGB define to Vulkan renderer
2021-11-17 08:46:23 +01:00
clayjohn
358820c4b7 Fix SRGB conversions in Vulkan Renderer 2021-11-16 20:56:13 -08:00
Brian Semrau
716e15cd26 Fix multimesh still drawing when visible instances is zero 2021-11-12 21:51:14 -05:00
Yuri Roubinsky
826e781bfa Fix default_texture_param in shader pipeline to support uniform arrays 2021-11-12 12:53:40 +03:00
NHodgesVFX
dbe366a830 add more OpenGL attributes 2021-11-08 20:12:11 -05:00
clayjohn
0eff109a21 Added SSIL post processing effect 2021-11-06 12:43:19 -07:00
JFonS
c571e4a7f4 Implement distance fade and transparency
The built-in ALPHA in spatial shaders comes pre-set with a per-instance
transparency value. Multiply by it if you want to keep it.

The transparency value of any given GeometryInstance3D is affected by:
   - Its new "transparency" property.
   - Its own visiblity range when the new "visibility_range_fade_mode"
     property is set to "Self".
   - Its parent visibility range when the parent's fade mode is
     set to "Dependencies".

The "Self" mode will fade-out the instance when reaching the visibility
range limits, while the "Dependencies" mode will fade-in its
dependencies.

Per-instance transparency is only implemented in the forward clustered
renderer, support for mobile should be added in the future.

Co-authored-by: reduz <reduzio@gmail.com>
2021-10-25 11:39:34 +02:00
Yuri Roubinsky
9142df46b3 Fix built-in texture samplers passing for spatial shader mode 2021-10-21 12:32:32 +03:00
Robin Arys
0e31465a59 Fix shaders that use TIME do not force editor to continuously update 2021-10-18 22:53:20 +02:00
mennomax
b4eeeb315a
Swap args of Plane(point, normal) constructor
Now (normal, point)
2021-10-15 20:49:42 -05:00
Brian Semrau
e9f1b0a0b2 Remove incorrect fog height density remapping 2021-10-14 16:09:45 -04:00
Hugo Locurcio
265bae824f
Remove unimplemented Environment.ambient_light_occlusion_color property
This property was intended to provide a way to have SSAO or VoxelGI
ambient occlusion with a color other than black. However, it was
dropped during the Vulkan renderer development due to the performance
overhead it caused when the feature wasn't used.
2021-10-07 17:47:52 +02:00
Yuri Roubinsky
6873ecaaf9 Added support for uniform arrays in shaders 2021-10-04 13:57:44 +03:00
Lightning_A
c63b18507d Use range iterators for Map 2021-09-30 15:09:12 -06:00
Hugo Locurcio
ba65730cbf
Rename RID's getornull() to get_or_null() 2021-09-29 23:58:02 +02:00
Rémi Verschelde
ec23d1348a
Merge pull request #52409 from GiantBlargg/position-depth-pre-pass 2021-09-17 14:21:29 +02:00
Rémi Verschelde
8ecc571158
Merge pull request #49063 from Calinou/remove-16x-msaa
Remove 16× MSAA support due to driver bugs and low performance
2021-09-13 17:34:04 +02:00
Lyuma
aca4b737f1 8 uvs for glTF2, URI decode and Vertex Custom api.
Add glTF2 uri decode for paths.

Add vertex custom apis.

Add scene importer api.

Change Color to float; add support for float-based custom channels in SurfaceTool and EditorSceneImporterMesh

Co-authored-by: darth negative hunter
 <thenegativehunter2@users.noreply.github.com>
2021-09-10 09:16:48 -07:00
Daniel Doran
3138b94058 Fix depth pass for shaders that set POSITION 2021-09-05 01:05:42 -06:00
Clay John
036b7a0985
Merge pull request #51873 from Chaosus/fix_uniform_error_spam
Fix incorrect checking of uniform set to prevent error spam (2)
2021-08-31 11:28:48 -07:00
Hugo Locurcio
7192852da3
Remove 16× MSAA support due to driver bugs and low performance
In the `master` branch, 16× MSAA caused the entire system to freeze
on NVIDIA GPUs. This is likely caused by graphics drivers not actually
implementing 16× MSAA, but combining 8× MSAA with 2× SSAA instead.

On top of that, modern shader complexity makes 16× MSAA very difficult
to use while keeping a good framerate. 8× MSAA is hard enough to use
as it is.
2021-08-25 07:56:27 +02:00
Yuri Roubinsky
b6af457d25 Fix incorrect checking of uniform set to prevent error spam (2) 2021-08-19 09:11:01 +03:00
Hugo Locurcio
a139e58f8c
Add comments at the top of each built-in shader to ease debugging
When a shader error is printed about a built-in shader, the origin
of the shader will now be recognizable immediately by looking at
the top of the printed shader code.
2021-08-18 03:09:22 +02:00
reduz
6027cd0a1d Fixes to mobile renderer
* Make sure shaders are named, to aid in debug in case of failure
* SceneRenderRD was being wrongly initialized (virtual functions being called when derivative class not initialized).
* Fixed some bugs resulting on the above being corrected.
2021-08-17 13:52:06 -03:00
Yuri Roubinsky
9de779344c Makes a clear error message if shader compilation failed 2021-08-16 11:25:20 +03:00
Bastiaan Olij
4002650cb9 Fix read from screen and depth texture 2021-08-15 13:14:19 +10:00
Yuri Roubinsky
63c7d5c330 Removes an internal error report if shader fails compile 2021-08-12 10:18:18 +03:00
Rémi Verschelde
da339f8ffc
Merge pull request #51309 from Chaosus/fix_uniform_error_spam
Fix incorrect checking of uniform set to prevent error spam
2021-08-06 17:15:03 +02:00
Bastiaan Olij
b920bf05a4 Use subpasses to do 3D rendering and resolve in mobile renderer 2021-08-06 23:43:26 +10:00
Yuri Roubinsky
ac4406cfbe Fix incorrect checking of uniform set to prevent error spam 2021-08-06 12:20:12 +03:00
Rémi Verschelde
394191c02f
Merge pull request #50605 from Calinou/tweak-shader-code-style
Use C++11 raw literals for shader code to improve readability
2021-07-20 10:05:13 +02:00
reduz
9293bc3935 Implement more rendering options as specialization constants
* 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.
2021-07-19 21:51:29 -03:00
Hugo Locurcio
abc38b8d66
Use C++11 raw literals for shader code to improve readability
In files that have lots of branching, `\t` was replaced with a
tab character instead.
2021-07-19 08:19:50 +02:00
reduz
ad9f606ed8 Use specialization constants in clustered renderer
* Keep track of when projector, softshadow or directional sofshadow were enabled.
* Enable them via specializaton constant where it makes sense.
* Re-implements soft shadows.
* Re-implements light projectors.
2021-07-12 20:33:52 -03:00