Commit Graph

107 Commits

Author SHA1 Message Date
078bdef7e9 Merge pull request #51939 from clayjohn/VULKAN-horizon-so-fix
Compute horizon SO threshold before transformation
2021-09-13 11:44:42 +02:00
065d13eddc Replace ACES tonemapper with a high quality one 2021-09-07 19:46:02 -03:00
fbac863bfb Add source rectangle to blit 2021-08-29 14:57:16 +10:00
90a35dac48 Merge pull request #51908 from bruvzg/msdf_fonts2
Make FontData importable resource. Add multi-channel SDF font rendering.
2021-08-27 08:51:37 -07:00
712bcf564f Merge pull request #52092 from Calinou/voxelgi-remove-anisotropic-leftovers
Remove leftovers of anisotropy in the VoxelGI shader code
2021-08-27 12:22:57 -03:00
4c3f7d1290 Makes FontData importable resource.
Adds multi-channel SDF font texture generation and rendering support.
Adds per-font oversampling support.
Adds FontData import plugins (for dynamic fonts, BMFonts and monospaced image fonts), font texture cache pre-generation and loading.
Adds BMFont binary format and outline support.
2021-08-27 15:43:18 +03:00
6e87d62873 Merge pull request #50883 from BastiaanOlij/mobile_hdr
Scale color output in the mobile renderer to provide HDR support
2021-08-26 11:23:22 +10:00
6a6c0890c2 Remove leftovers of anisotropy in the VoxelGI shader code
Anisotropy support was removed when VoxelGI was reworked as it was
too demanding on the GPU.
2021-08-25 10:23:28 +02:00
583b6a594a Merge pull request #51971 from aaronfranke/https
Replace HTTP URLs with HTTPS for sites with HTTPS versions
2021-08-23 15:58:54 +02:00
d22163c657 Scale color output in the mobile renderer to provide HDR support 2021-08-23 15:30:36 +10:00
2d446771d6 Merge pull request #51980 from BastiaanOlij/fix_multiview_tonemap
Fix multiview defines in tonemap shader
2021-08-23 12:02:18 +10:00
ae1702bee5 Replace HTTP links with HTTPS for sites with HTTPS versions 2021-08-22 20:13:11 -05:00
7e94c583e0 Fixed non-uniform scaling of normals 2021-08-22 19:28:18 +01:00
74a647bddd Fix multiview defines in tonemap shader 2021-08-22 21:30:58 +10:00
bccc4cd735 Compute horizon so threshold before transformation 2021-08-20 19:27:52 -07:00
55e7832d7b Improvements to SpotLight3D and OmniLight3D's shadows
OmniLight3D:
* Fixed lack of precision in cube map mode by scaling the projection's
  znear.
* Fixed aliasing issues by making the paraboloids use two square regions instead of two half
  squares.
* Fixed shadowmap atlas bleeding by adding padding.
* Fixed sihadow blur's inconsistent radius and unclamped sampling.

SpotLight3D:
* Fixed lack of precision by scaling the projection's znear.
* Fixed normal biasing.

Both:
* Tweaked biasing to make sure it works out of the box in most situations.
2021-08-19 13:46:51 +02:00
700f9d916d More fixes to mobile renderer
* Specify all precision qualifiers
* Makes renderer work on Adreno Vulkan
2021-08-18 12:20:19 -03:00
d5a30431b9 Merge pull request #51635 from reduz/further-mobile-optimizations
More optimizations on the mobile renderer.
2021-08-16 14:50:52 -03:00
4e1d91f4d3 Merge pull request #50998 from BastiaanOlij/single_bokeh_dof_raster
Rewrote raster DOF shader to using BOKEH
2021-08-14 14:44:23 +02:00
cfac8972e1 More optimizations on the mobile renderer.
* Specialization constants used to disable anything not needed to draw
* Added softshadow and projector support on mobile.

This new approach ensures mobile shaders are smaller and more efficient, but relies on more pipeline versions compiled on demand.
As a result, random stalls can ocur like in Godot 3.x. These will be solved by using background compilation and fallbacks eventually (but needs to be tested first).
2021-08-13 14:30:59 -03:00
e499758a77 Merge pull request #51025 from reduz/fix-directional-shadow-bias
Fix directional shadow bias
2021-08-13 16:45:49 +02:00
07fd559478 Implemented raster versions of bokeh shaders to replace broken gaussian implementation 2021-08-13 10:20:14 +10:00
62047e4e48 Merge pull request #51486 from reduz/fixes-to-mobile-renderer
Fixes and optimizations to mobile renderer
2021-08-11 15:19:11 +02:00
a7c3e0dcd6 Use f0 instead of albedo in blinn and phong 2021-08-10 21:54:24 -07:00
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
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
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
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
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
c76426527b Porting cubemap compute shaders to raster for the mobile renderer 2021-08-01 21:22:38 +10:00
55d357b1eb Fix directional shadow bias
* Simplified code a lot, bias based on normalized cascade size.
* Lets scale cascades, max distance, etc. without creating acne.
* Fixed normal biasing in directional shadows.

I removed normal biasing in both omni and spot shadows, since the technique can't be easily implemented there.
Will need to be replaced by something else.
2021-07-29 13:51:32 -03: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
2f221e5fd5 Merge pull request #50250 from luzpaz/typos
Fix various typos
2021-07-25 12:38:58 +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
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
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
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
7f6027927a Fix Subsurface Scattering
* Works again
* Transmittance also works again
* Removed the curve patamter, exp() function is good enough.
2021-07-05 17:17:45 -03:00
0e366dc7ac Fix SSR
* Was broken at some point long time ago, this restores it.
2021-07-03 23:32:34 -03:00
37776b2867 Clean up RenderingServer and its bindings
* Rewrote bindings for RenderingServer.
* They are now all up to date.
* Several unused methods and deprecated features were cleaned up.
2021-07-01 09:07:36 -03:00
d55ebc3a5d Fix non uniform scaling in 3D objects
* Flag was there, but not implemented.
* Fixed issue with base flags not being initialized.
2021-06-29 11:45:59 -03:00
ccbf31685d Fixes Mesh2D drawn without modulation 2021-06-23 17:38:31 +02:00
69e1f25299 Fix typo in CUSTOM_IRRADIANCE calculations 2021-06-15 15:17:00 -04:00