Commit Graph

12 Commits

Author SHA1 Message Date
Mathias Agopian
71d0723026 add zstd to the build 2025-08-07 14:58:18 -07:00
Romain Guy
53aac259a0 Fix emscripten compilation errors and warnings (#6688)
These errors and warnings only appear with more recent versions of
the emscripten SDK.
2023-03-27 17:33:45 -07:00
Johnathon Selstad
1e3ddd612e Organize Subprojects into Folders in the IDE (#5934)
* Begin Sorting SubProjects into Folders

* Add more subprojects to folders

* Add even more subprojects to folders

* Add further subprojects to folders

* Move the last two projects

* Move Resources to a Resources subfolder

* Remove spaces to be stylistically coherent

* Revert Improper CMake Modifications

* Revert erroneous line removals

* Only specify sdl2's folder on WIN32

* Add the shader subprojects to a Generated folder

* Move shaders to Filament/Shaders
2022-08-17 12:42:21 -07:00
Philip Rideout
140ebbf10d Repair Android and iOS builds. 2022-06-01 13:09:47 -07:00
Philip Rideout
00ecba67b5 Clean up BasisU CMake targets, add zstd target.
We were re-building various C++ files in three different targets
(basis_encoder, basis_transcoder, basisu executable), it's probably
better just to set up proper dependencies between the libraries.  Note
that I'm not sure if this actually improves build times.

More importantly, this creates a CMake target for the zstd library
because we want to use zstd in other places.
2022-06-01 13:09:47 -07:00
Ben Doherty
42e4e5e3ae Only build basisu tool on host platforms (#5575) 2022-05-19 11:16:37 -07:00
Philip Rideout
b7c9a36d57 Ktx2Reader: Fix error in enum translation table.
This caused DXT5 content to be interpreted as DXT3 by the GPU,
which seemed to manifest as visual artifacts in the alpha channel.
2022-04-29 16:29:53 -07:00
Philip Rideout
d76551ab28 Add async interface to Ktx2Reader. 2022-04-29 14:20:57 -07:00
Philip Rideout
d52a24b6e9 Incorporate feedback from code review. 2022-04-15 10:48:48 -07:00
Philip Rideout
9aeec3a759 Add Ktx2Reader and BasisEncoder and use them in samples.
mipgen can now emit basis-encoded KTX2 files. Both the desktop and
web "suzanne" samples use this as a test for compressed textures.

This PR does not add KTX2 support to glTF, but it's on the way.

`BasisEncoder` has a builder style API that calls the basis encoder to
create KTX2 files. This hides some low-level BasisU features that we are
not using, like file I/O and mipmap generation.

`Ktx2Reader` is an easy-to-use API for creating Filament textures from
KTX2 files. Its API primarily consists of these two methods:

    bool requestFormat(Texture::InternalFormat format);
    Filament::Texture* load(const uint8_t* data, size_t size);

The first method is used to build an ordered list of formats that are
supported by your hardware. The second method consumes the contents of a
basis-encoded KTX2 file and attempts to produce a Filament texture with
a preferred format.

IMPORTANT: Our tools still let you use KTX1 for non-compressed images
because it is useful for HDR, but you can no longer use KTX1 for
block-compressed data.

Partial fix for #4771.
2022-04-15 10:48:48 -07:00
Philip Rideout
d16cc50561 Shrink BasisU transcoder.
We do not support these formats and they add bloat to the basis tables.
In a release x86 build, this reduces the transcoder size from 774 KiB to
475 KiB.
2022-04-08 15:03:30 -07:00
Philip Rideout
39d6106ef2 Add BasisU to third_party. 2022-04-06 09:02:18 -07:00