1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00
Commit Graph

85 Commits

Author SHA1 Message Date
Thaddeus Crews
b95024752a SCons: Remove system includes 2025-10-07 08:11:29 -05:00
Thaddeus Crews
b17aa3343a Revert "SCons: Add CPPEXTPATH for external includes" 2025-10-06 13:09:22 -05:00
Aaron Franke
3d1c9fd5de Move server files into their subfolders 2025-09-30 19:39:39 -07:00
BlueCube3310
894d3939cd BasisU: Configure HDR quality from the settings 2025-05-05 23:56:24 +02:00
Thaddeus Crews
5bc01f2994 Merge pull request #105080 from beicause/basisu-ktx2-settings
BasisU: Use KTX2 format and add import options to configure encoder
2025-05-05 11:24:20 -05:00
LuoZhihao
237597b01f BasisU: Use KTX2 format and add import options to configure encoder 2025-05-03 01:45:38 +08:00
Daniel Kinsman
a0cc41b5ed Use libjpeg-turbo for improved jpg compatibility and speed
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2025-05-02 11:47:56 +02:00
Thaddeus Crews
be994d59c9 Merge pull request #103968 from Chubercik/basis_universal-1.60
basis_universal: Update to 1.60
2025-04-27 19:21:17 -05:00
Thaddeus Crews
f25fc34439 SCons: Add CPPEXTPATH for external includes 2025-04-02 07:29:08 -05:00
Thaddeus Crews
15a5a2f309 Merge pull request #103766 from BlueCube3310/basisu-hdr-astc
BasisUniversal: Ensure ASTC's HDR variant is supported when transcoding
2025-03-12 10:31:49 -05:00
Jakub Marcowski
246b062bd6 basis_universal: Update to 1.60 2025-03-11 13:43:00 +01:00
Thaddeus Crews
324512e11c Style: Replace header guards with #pragma once 2025-03-07 17:33:47 -06:00
BlueCube3310
4d46ef8e8e BasisUniversal: Ensure ASTC's HDR variant is supported when transcoding 2025-03-07 15:26:03 +01:00
Rémi Verschelde
fbde06e4c8 basis_universal: Clarify encoder-only dependencies, only used in editor builds 2024-12-05 21:01:58 +01:00
Rémi Verschelde
a51c60f5e3 Revert "basis_universal: Make tinyexr dependency explicit"
This reverts commit 220f2611cc.
2024-11-30 01:25:53 +01:00
Gio
220f2611cc basis_universal: Make tinyexr dependency explicit 2024-11-29 22:32:04 +01:00
clayjohn
985dc61386 Defer initializing BasisU encoder until it is needed.
This saves a lot of time on startup
2024-11-17 14:03:20 -08:00
Yevhen Babiichuk (DustDFG)
af6d260c17 Don't include core/io/image.h in core/os/os.h
`core/os/os.h` doesn't use `core/io/image.h`. It just brings
transitive dependencies. Lots of dependencies because `core/os/os.h`
is transitively included in almost every file of godot

Also added `core/io/image.h` into files^1 where `Ref<Image>` and `core/os/os.h`
were used to prevent obscure errors involving `Ref<Image>`

^1 except those which include `core/io/image_loader.h` or `core/io/image.h` by
corresponding .h file with the same name

Signed-off-by: Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com>
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2024-10-18 19:04:19 +03:00
BlueCube3310
200ed0971a BasisU: Update to 1.50.0 and add HDR support 2024-10-12 18:02:44 +02:00
Hugo Locurcio
c1dc59f713 Disable unused Basis Universal features to reduce binary size 2024-09-29 02:29:27 +02:00
Thaddeus Crews
9f9ee0c813 SCons: Add unobtrusive type hints in SCons files 2024-09-25 09:34:35 -05:00
BlueCube3310
337d80d8f5 BasisUniversal: Use RGTC compression when available 2024-09-10 12:06:00 +02:00
BlueCube3310
0ed45629fd Support 64-bit image sizes for VRAM compression 2024-07-21 21:06:14 +02:00
Hugo Locurcio
0445ccf428 Fix Image CowData crash when baking large lightmaps
This switches to 64-bit integers in select locations of the Image
class, so that image resolutions of 16384×16384 (used by
lightmap texture arrays) can be used properly. Values that are larger
should also work.

VRAM compression is also supported, although most VRAM-compressed
formats are limited to individual slices of 16384×16384. WebP
is limited to 16383×16383 due to format limitations.
2024-07-19 16:04:30 +02:00
Hugo Locurcio
ec97372f04 Make Basis Universal import quiet unless engine is in verbose mode
This makes Basis Universal stdout match other compression modes.
2024-06-22 00:34:53 +02:00
Rémi Verschelde
28a18cf1b8 Merge pull request #88763 from BlueCube3310/image-is-compressed-static
Image: Add static `is_format_compressed` function.
2024-05-02 14:01:18 +02:00
BlueCube3310
c71490043a Fix BasisU compression on images with resolutions not divisible by 4. 2024-05-02 12:15:02 +02:00
BlueCube3310
8239aeec8e Image: Add static is_format_compressed function. 2024-02-28 19:42:06 +01:00
BlueCube3310
0c596df0e0 BasisUniversal: Fix texture decompression 2024-02-22 19:11:17 +01:00
Rémi Verschelde
c3de771292 Merge pull request #88485 from BlueCube3310/basisu-astc-v2
Add ASTC support to BasisUniversal
2024-02-22 11:23:11 +01:00
Rémi Verschelde
b167113b1c Merge pull request #88508 from akien-mga/basisu_unbundled_jpgd
basis_universal: Unbundle jpgd to fix symbol conflict, use our newer copy with SSE2 support
2024-02-20 10:30:59 +01:00
BlueCube3310
0afee63712 Add ASTC support to BasisUniversal 2024-02-19 17:32:31 +01:00
BlueCube3310
a1997d13e4 Clean up and optimize BasisUniversal 2024-02-19 12:39:06 +01:00
BlueCube3310
bf919eafa7 Extract BasisUniversal code into its own files 2024-02-19 10:56:02 +01:00
Rémi Verschelde
48ed0474e2 basis_universal: Unbundle jpgd, use our newer copy 2024-02-18 18:55:40 +01:00
Rémi Verschelde
e457f41f9b Remove code relative to obsoleted ETC texture format
Co-authored-by: BlueCube3310 <53150244+BlueCube3310@users.noreply.github.com>
2024-02-14 17:16:41 +01:00
BlueCube3310
51ad937532 Fix BasisUniversal ETC RA_AS_RG transcoding 2024-01-07 12:53:01 +01:00
A Thousand Ships
517e9f8aef [Modules] Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable 2023-09-26 16:44:52 +02:00
cow-neaz
56cfde3a5c Fix Basic Universal compressing with normal maps. 2023-06-16 11:20:16 -07:00
Rémi Verschelde
25b2f1780a Style: Harmonize header includes in modules
This applies our existing style guide, and adds a new rule to that style
guide for modular components such as platform ports and modules:

Includes from the platform port or module ("local" includes) should be listed
first in their own block using relative paths, before Godot's "core" includes
which use "absolute" (project folder relative) paths, and finally thirdparty
includes.

Includes in `#ifdef`s come after their relevant section, i.e. the overall
structure is:

- Local includes
  * Conditional local includes
- Core includes
  * Conditional core includes
- Thirdparty includes
  * Conditional thirdparty includes
2023-06-15 14:35:45 +02:00
Lyuma
0addf38047 basisu: Loop over the last mipmap lod 2023-02-26 16:01:54 -08:00
K. S. Ernest (iFire) Lee
add503e71d Fix basisu mipmaps
Previously basisu was storing mip maps as an array of basisu in the internal format for Texture. The new work makes sense and it generates smaller files with one image.

This pull request fixes the basisu decompression and keep the approach of 1 image. If we need to change the format in 4.x, we can still support the old format with some limitations too. Basisu from gltfpack can only output with mipmaps.

The single image will not work for StreamedTexture. We should support both approaches for CompressedTexture we use one, and for StreamedTexture we use another.

Additional error checking for hdr images and for nullptr.
2023-02-25 13:48:51 -08:00
Rémi Verschelde
e2fc0acd36 Fix includes of thirdparty libs which can be unbundled on Linux
Changes `builtin_icu` and `builtin_recast` to match the folder names in
`thirdparty`.
2023-02-16 15:52:13 +01:00
K. S. Ernest (iFire) Lee
39922d7167 Handle gltf binary
[ Ignore and Warn | Extract Textures (default) | Optimize Loading Embedded as Basisu ]

Enable compressed mip maps from Basis Universal for faster compressions.

Increase the quality of Basis to avoid corruption.

To keep compatibility use the first mip of the previous internal Godot format.

Because texture names may have invalid filename characters, adds String::validate_filename to sanitize filenames for import pipeline use.
2023-01-27 02:02:02 -08:00
Rémi Verschelde
d95794ec8a One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
Hirotoshi Yoshitaka
d144e278ac Fix Basis Universal format texture rendering failure
Fix "failed! on level 0" error message on exported projects with Basis Universal textures.
2022-12-21 17:29:38 +09:00
kobewi
072f6feaba Make some Image methods static 2022-10-14 14:34:15 +02:00
Rémi Verschelde
39facb35a0 SCons: Unify tools/target build type configuration
Implements https://github.com/godotengine/godot-proposals/issues/3371.

New `target` presets
====================

The `tools` option is removed and `target` changes to use three new presets,
which match the builds users are familiar with. These targets control the
default optimization level and enable editor-specific and debugging code:

- `editor`: Replaces `tools=yes target=release_debug`.
  * Defines: `TOOLS_ENABLED`, `DEBUG_ENABLED`, `-O2`/`/O2`
- `template_debug`: Replaces `tools=no target=release_debug`.
  * Defines: `DEBUG_ENABLED`, `-O2`/`/O2`
- `template_release`: Replaces `tools=no target=release`.
  * Defines: `-O3`/`/O2`

New `dev_build` option
======================

The previous `target=debug` is now replaced by a separate `dev_build=yes`
option, which can be used in combination with either of the three targets,
and changes the following:

- `dev_build`: Defines `DEV_ENABLED`, disables optimization (`-O0`/`/0d`),
  enables generating debug symbols, does not define `NDEBUG` so `assert()`
  works in thirdparty libraries, adds a `.dev` suffix to the binary name.

Note: Unlike previously, `dev_build` defaults to off so that users who
compile Godot from source get an optimized and small build by default.
Engine contributors should now set `dev_build=yes` in their build scripts or
IDE configuration manually.

Changed binary names
====================

The name of generated binaries and object files are changed too, to follow
this format:

`godot.<platform>.<target>[.dev][.double].<arch>[.<extra_suffix>][.<ext>]`

For example:
- `godot.linuxbsd.editor.dev.arm64`
- `godot.windows.template_release.double.x86_64.mono.exe`

Be sure to update your links/scripts/IDE config accordingly.

More flexible `optimize` and `debug_symbols` options
====================================================

The optimization level and whether to generate debug symbols can be further
specified with the `optimize` and `debug_symbols` options. So the default
values listed above for the various `target` and `dev_build` combinations
are indicative and can be replaced when compiling, e.g.:

`scons p=linuxbsd target=template_debug dev_build=yes optimize=debug`
will make a "debug" export template with dev-only code enabled, `-Og`
optimization level for GCC/Clang, and debug symbols. Perfect for debugging
complex crashes at runtime in an exported project.
2022-09-26 16:31:46 +02:00
reduz
de0ca3b999 Refactor module initialization
* Changed to use the same stages as extensions.
* Makes the initialization more coherent, helping solve problems due to lack of stages.
* Makes it easier to port between module and extension.
* removed the DRIVER initialization level (no longer needed).
2022-05-04 17:34:51 +02:00
bruvzg
f851c4aa33 Fix some issues found by cppcheck. 2022-04-06 14:34:37 +03:00