Commit Graph

225 Commits

Author SHA1 Message Date
ca117910da Fixes and optimizations to mobile renderer
* Only apply final actions to attachments used in the last pass.
* Fixes to draw list final action (was using continue instead of read/drop).
* Profiling regions inside draw lists now properly throw errors.
* Ability to enable gpu profile printing from project settings. (used to debug).
2021-08-10 23:17:28 -03:00
afb40920fe Merge pull request #51411 from clayjohn/VULKAN-blinn-phong
[4.0] Make Blinn and Phong specular modes take albedo into account
2021-08-10 21:11:48 +02:00
16d73fefdb Merge pull request #50682 from aaronfranke/basis-looking-at
Move code for looking_at to Basis
2021-08-10 11:28:12 +02:00
51b4df72a7 Merge pull request #51436 from Calinou/tonemap-clamp-negative-colors
Clamp negative colors regardless of the tonemapper to avoid artifacts
2021-08-10 09:56:11 +02:00
56f17d925f Merge pull request #51417 from clayjohn/Vulkan-horizon-so
Add horizon specular occlusion
2021-08-10 09:56:02 +02:00
fa962ff27d Make Blinn and Phong specular modes PBR 2021-08-09 20:09:00 -07:00
84f720966c Use doubles for time in many other places 2021-08-09 14:05:42 -05:00
57451f132f Clamp negative colors regardless of the tonemapper to avoid artifacts
Color artifacts could be visible when using negative lights with the
Filmic and ACES tonemapping operators, as these did not clamp negative
colors.
2021-08-09 17:01:07 +02:00
0a38d5c8f7 Merge pull request #43158 from nathanfranke/fix-gradient-and-draw-tile
Fix Gradient and Color Picker checkerboard, Fix tile parameter for CanvasItem.draw_texture_rect
2021-08-09 16:47:58 +02:00
85399a9170 Merge pull request #51155 from Chaosus/shader_fix_specular_mode
Fix a default shader specular render mode to `SCHLICK_GGX`
2021-08-09 08:13:47 +02:00
7bdea93497 Add horizon specular occlusion 2021-08-08 19:43:48 -07:00
051234e84e Fix Gradient, Color Picker BG, Fix CanvasItem::draw_texture_rect p_tile 2021-08-07 16:40:50 -05:00
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
b920bf05a4 Use subpasses to do 3D rendering and resolve in mobile renderer 2021-08-06 23:43:26 +10:00
47a6bb2f28 Fix a default shader specular render mode to (SCHLICK_GGX/BLINN) 2021-08-06 16:01:58 +03:00
ac4406cfbe Fix incorrect checking of uniform set to prevent error spam 2021-08-06 12:20:12 +03:00
dbd1a90bd4 Merge pull request #50942 from BastiaanOlij/cubemap_raster
Porting cubemap compute shaders to raster for the mobile renderer
2021-08-01 21:52:24 +02:00
9f3ae0adcd Move code for looking_at to Basis 2021-08-01 12:49:02 -05:00
c76426527b Porting cubemap compute shaders to raster for the mobile renderer 2021-08-01 21:22:38 +10:00
e8877806ec Fix 'Attempted to remove invalid ID' errors 2021-07-31 15:30:31 +02:00
e6a544c169 Merge pull request #50891 from Vitika9/50852
Removed redundant assignment of `blur_pipeline`
2021-07-26 21:43:38 +02:00
8f6c16e4a4 Merge pull request #50847 from reduz/implement-binary-shader-compilation
Implement Binary Shader Compilation
2021-07-26 17:09:48 +02:00
1c63866996 Fixed coding style 2021-07-26 20:12:16 +05:30
7f908cf40f Fix expression in cluster_builder_rd.h
This expression should now work as intended.
2021-07-26 08:19:53 -04:00
cf3f404d31 Implement Binary Shader Compilation
* Added an extra stage before compiling shader, which is generating a binary blob.
* On Vulkan, this allows caching the SPIRV reflection information, which is expensive to parse.
* On other (future) RenderingDevices, it allows caching converted binary data, such as DXIL or MSL.

This PR makes the shader cache include the reflection information, hence editor startup times are significantly improved.
I tested this well and it appears to work, and I added a lot of consistency checks, but because it includes writing and reading binary information, rare bugs may pop up, so be aware.
There was not much of a choice for storing the reflection information, given shaders can be a lot, take a lot of space and take time to parse.
2021-07-26 08:40:39 -03:00
7341dd5afa Merge pull request #50856 from SirQuartz/patch-32
Fix always true expression `radius > 0.98 || radius < 1.02` in `cluster_builder_rd.h`
2021-07-26 08:47:33 +02:00
a1a392045d Fix always true expression in cluster_builder_rd.h
This pull request fixes an issue where an expression would always evaluate to `true` no matter what.
2021-07-25 11:53:04 -04:00
5cf3bed0c8 Fix various typos
Follow-up typos found via `codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,fave,findn,hist,inout,leapyear,lod,nd,numer,ois,ony,paket,seeked,sinc,switchs,te,uint`
2021-07-25 07:18:25 -04:00
ff0b5f8fa1 Merge pull request #50809 from akien-mga/iterators-const-references 2021-07-25 12:52:58 +02:00
2f221e5fd5 Merge pull request #50250 from luzpaz/typos
Fix various typos
2021-07-25 12:38:58 +02:00
ac3322b0af Use const references where possible for List range iterators 2021-07-25 12:22:25 +02:00
2a8a59eac0 Merge pull request #50644 from BastiaanOlij/mobile_compute_to_fragment 2021-07-25 11:58:11 +02:00
3564c16cb8 Fix various typos with codespell
Found via `codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,fave,findn,hist,inout,leapyear,lod,nd,numer,ois,ony,paket,seeked,sinc,switchs,te,uint`
2021-07-25 11:21:51 +02:00
1f69582835 Use fragment shader instead of compute shader for effects for mobile renderer 2021-07-25 13:58:21 +10:00
4e6efd1b07 Use C++ iterators for Lists in many situations 2021-07-23 17:38:28 -04:00
fa56989818 Merge pull request #50537 from Calinou/improve-shader-error-output-2
Add error marking to the shader error console output
2021-07-20 11:00:17 +02:00
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
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
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
9fc2849a57 Add error marking to the shader error console output
This makes it possible to see where the shader error is without
having to look at the trace printed below the source code.
2021-07-17 03:05:11 +02:00
76e25438c9 Fixes to forward mobile
* use valid format for framebuffer: VK_FORMAT_A2B10G10R10_UNORM_PACK32
* Unfortunately cant be used for compute.
* Mobile will need to do refprobe, sky, mipmapblurring using raster.
2021-07-15 21:05:58 -03:00
3f12765a7e Merge pull request #49678 from BastiaanOlij/mobile_renderer_select_color_format
Use 32bit instead of 64bit 3D render buffer on mobile renderer
2021-07-15 10:16:39 -03:00
d6dc77aa36 Removes lines about window size from the console output 2021-07-14 20:58:53 +03:00
8a29208fc4 Use 32bit instead of 64bit 3D render buffer on mobile 2021-07-13 10:26:28 +10:00
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
b218c6785e Merge pull request #50194 from BastiaanOlij/fix_multiple_reflection_probes
Fix indexing of multiple reflection probes
2021-07-12 19:22:47 +02:00
83addd6ee5 Fix material invalidation on reimport.
* IF a texture was reimported (calling replace as an example), it would invalidate all materials using it, causing plenty of errors.
* Added the possibility to get a notification when a uniform set is erased.
* With this notification, materials can be queued for update properly.
2021-07-07 19:55:20 -03:00
24efb13f7e Fix threaded update for textures
* Previews and other stuff now works again.
* Not the best solution, will have to be improved in the future usinc async queues where supported.
2021-07-07 18:06:06 -03:00
48a5226829 Merge pull request #50193 from reduz/fix-command-queue-crash
Fix Command Queue Crash
2021-07-07 16:36:13 +02:00
d41e3f9aeb Fix Command Queue Crash
* No longer allow sending an object (texture) to the server as material parameter
* Keep a parameter cache locally in ShaderMaterial
2021-07-07 10:57:56 -03:00