summaryrefslogtreecommitdiff
path: root/modules/lightmapper_rd/lightmapper_rd.cpp
AgeCommit message (Collapse)Author
2021-07-26Implement Binary Shader Compilationreduz
* 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-06-19Rename `instance()`->`instantiate()` when it's a verbLightning_A
2021-05-03Assorted fixes to UV unwrapping and GPU lightmapperjfons
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.
2021-04-27Core: Drop custom `copymem`/`zeromem` definesRémi Verschelde
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.
2021-02-18Reorganize Project Settingsreduz
-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.
2021-02-07Invert spotlight angle attenuationjfons
Inverted the spotlight angle attenuation so a higher value results in a dimmer light, this makes it more consistent with the distance attenuation. Also changed the way spotlighs are computed in SDFGI and GIPorbes and GPU lightmapper, now it matches the falloff used in the scene rendering code.
2021-01-26Reorganize RenderingDevice barriersreduz
-Removed sync to draw, now everything syncs to draw by default. -Fixed many validation layer errors. -Added support for VkImageViewUsageCreateInfo to fix validation layer warnings. -Texture, buffer, raster and compute functions now all allow spcifying which barriers will be used.
2021-01-01Update copyright statements to 2021Rémi Verschelde
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 🎆
2020-12-28Rename empty() to is_empty()Marcel Admiraal
2020-12-09Static analyzer fixes:bruvzg
Removes unused code in OS. Fixes return types. Fixes few typos.
2020-12-04Rename RD texture "type" to "texture_type"Aaron Franke
"type" isn't very descriptive for exposed code, and this variable is exposed via RD_SETGET.
2020-12-04Rename RD uniform "type" to "uniform_type"Aaron Franke
"type" isn't very descriptive for exposed code, and this variable is exposed via RD_SETGET.
2020-11-07Reorganized core/ directory, it was too fatty alreadyreduz
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
2020-05-27Split `Geometry` singleton into `Geometry2D` and `Geometry3D`Andrii Doroshenko (Xrayez)
Extra `_2d` suffixes are removed from 2D methods accoringly.
2020-05-14Style: Enforce separation line between function definitionsRémi Verschelde
I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
2020-05-14Style: Fix missing/invalid copyright headersRémi Verschelde
2020-05-10New lightmapperJuan Linietsky
-Added LocalVector (needed it) -Added stb_rect_pack (It's pretty cool, we could probably use it for other stuff too) -Fixes and changes all around the place -Added library for 128 bits fixed point (required for Delaunay3D)