When using GAUSSIAN_NORMALS, image::resampleImage automatically unitizes
its output. This means that clients (e.g. mipgen) need to ensure that
the source image is in [-1,+1] rather than [0,+1].
This code manages the virtual machine as well as
external streams. The idea here is that the Vulkan
platform could use this code when it adds support
for external buffers/streams (or at least it will
be easier). None of this needs EGL.
Rename everything related.
Also Platform::create() returns a raw Driver*
instead of a unique_ptr<Driver>. This is to
remove a dependency on <memory> in public
headers.
FEngine doesn’t take ownership of ExternalContext if
it’s passed as a parameter, however, in the common
case it’s not, and FEngine owns it — and must take
care of destroying it.
Also fix this behavior in “single thread” mode,
the given ExternalContext was ignored.
Due to an assertion in etc2comp, this unfortunately uses RGB8 instead of
RG11 but it still helps quite a bit (3.3 MB savings in the unzipped KTX
size).
This shrinks file size as follows, although it seems to darken the
rendered result.
```
1398209 Oct 2 16:22 ao.ktx
699172 Oct 2 16:20 ao_etc.ktx
1398209 Oct 2 16:22 metallic.ktx
699172 Oct 2 16:19 metallic_etc.ktx
1398209 Oct 2 16:22 roughness.ktx
699172 Oct 2 16:20 roughness_etc.ktx
```
Fixes#309
- remove some currently unused code that requires
GLES 3.1 headers. It’s not technically a problem,
but it makes the code less confusing. We can
put that back, when we need it.
- Turn off multi-sampling on GLES 3.0
- Add support for EXT_multisampled_render_to_texture
At build time, mipgen now creates several compressed and non-compressed
variants for albedo.
For ASTC we use the ARM encoder, for S3TC we use the STB encoder. The
latter is somewhat limited so we may wish to investigate other libraries
in the future (e.g., AMD Compressenator).
At run time, we detect which of these variants to download, based on
available WebGL extensions. In practice, this means that desktop
browsers will use the S3TC variant and mobile browsers will use the ASTC
variant.
The makes unzipped albedo go from ~4 MB to 682 KB using S3TC.
Mobile support (ASTC and ETC2) is coming in a future PR, stay tuned.
The compression API now takes block size instead of bit rate. Otherwise
it is quite possible for the encoder to generate a block size that is
not one of the valid block sizes that graphics API's can actually
consume.
this adds a new --type (-t) parameter that is
used to specify cmgen’s output.
faces: outputs cube maps separate faces (default
and current behavior)
equirect: outputs an equirectangular image
ktx: outputs a ktx file
--format=ktx now implies —type=ktx
This was designed as a standalone tool rather than a library, so we are
renaming their "main" function to "standalone_main", which is described
in the tnt README.
We'll also be adding a wrapper to our imageio library.
because the shadow map can be “focused”, its
texture coordinates can end-up very large, which
in turn can cause overflows in the calculation of
the PCF positions. Unfortunately some GPUs
abort in that situation, which causes artifacts.
Fix Bug 111455153
- internal cross storage is now always horizontal
and seamless.
- source cross images are now always converted to
internal format, conversion includes rescaling
and sampling if scaling down.
- vertical cross is supported again
- fixes#283
- replace hardcoded constants
This tool was producing bad output for the monkey roughness map because
the monkey map has an (unnecessary) alpha channel, and the tool was
assuming that the source image has 3 channels.
This fixes that particular case and changes the tool so that it
operates on single-channel data instead of 3-channel data.