taisei/src/resource
Andrei Alexeyev b13f98c681
Support 16-bit uint and 32-bit float textures
When textures are loaded as resources, the best available format is now
picked by default. That means that if your source image is 16-bit RGB,
you will get a 16-bit RGB texture (the alpha channel is added only if
necessary). However, grayscale images currently get expanded into RGB(A)
by the loaders automatically, so you will never get less than 3 channels
by default. This is good, because you most often expect grayscale images
to stay gray, and not red.

This behavior can be overriden with the new 'format' key in .tex files.
For example, if you only care about one channel in a gray image, you can
do this to save some VRAM:

    format = R16

The following is equivalent:

    format = R16U

And so is this:

    format = r 16 uint

The general syntax is:

    format = <channels><depth>[datatype]

    Where:
        * Channels is one of: R, RG, RGB, RGBA;
        * Depth is one of: 8, 16, 32;
        * Datatype is one of: uint (or just u), float (or just f)

    All fields are case-insensitive and may be separated by whitespace.

Note that the rendering backend may not support all of these formats,
and fallback to an inferior or a redundant one. The gl33 backend should
support all of them. The gles30 backend only supports 8-bit uint
textures for now.
2018-10-19 05:27:54 +03:00
..
animation.c fix various issues discovered by scan-build 2018-07-31 11:50:04 +03:00
animation.h Text rendering rewrite and optimizations; some refactoring (#129) 2018-06-30 00:36:51 +03:00
bgm.c Rendering system rewrite, tons of refactoring, optimizations, and other cool stuff (#116) 2018-04-12 17:08:48 +03:00
bgm.h Rendering system rewrite, tons of refactoring, optimizations, and other cool stuff (#116) 2018-04-12 17:08:48 +03:00
bgm_mixer.c Text rendering rewrite and optimizations; some refactoring (#129) 2018-06-30 00:36:51 +03:00
bgm_null.c Rendering system rewrite, tons of refactoring, optimizations, and other cool stuff (#116) 2018-04-12 17:08:48 +03:00
font.c OpenGL ES 3.0 rendering backend (#148) 2018-10-02 01:36:10 +03:00
font.h Some renderer refactoring (mostly API and GLES preparations) (#144) 2018-09-14 10:37:20 +03:00
meson.build Some renderer refactoring (mostly API and GLES preparations) (#144) 2018-09-14 10:37:20 +03:00
model.c Implement hardware index buffers; some renderer refactoring 2018-10-03 03:46:55 +03:00
model.h Implement hardware index buffers; some renderer refactoring 2018-10-03 03:46:55 +03:00
postprocess.c Some renderer refactoring (mostly API and GLES preparations) (#144) 2018-09-14 10:37:20 +03:00
postprocess.h Refactor framebuffer-related stuff (#130) 2018-07-04 11:36:16 +03:00
resource.c Kick SDL_image's ass out and replace JPEG with WebP 2018-10-19 00:16:06 +03:00
resource.h Refactor framebuffer-related stuff (#130) 2018-07-04 11:36:16 +03:00
sfx.c Rendering system rewrite, tons of refactoring, optimizations, and other cool stuff (#116) 2018-04-12 17:08:48 +03:00
sfx.h implement damage feedback sound 2018-06-12 18:00:32 +02:00
sfx_mixer.c Rendering system rewrite, tons of refactoring, optimizations, and other cool stuff (#116) 2018-04-12 17:08:48 +03:00
sfx_null.c Rendering system rewrite, tons of refactoring, optimizations, and other cool stuff (#116) 2018-04-12 17:08:48 +03:00
shader_object.c OpenGL ES 3.0 rendering backend (#148) 2018-10-02 01:36:10 +03:00
shader_object.h Some renderer refactoring (mostly API and GLES preparations) (#144) 2018-09-14 10:37:20 +03:00
shader_program.c Some renderer refactoring (mostly API and GLES preparations) (#144) 2018-09-14 10:37:20 +03:00
shader_program.h Some renderer refactoring (mostly API and GLES preparations) (#144) 2018-09-14 10:37:20 +03:00
sprite.c Some renderer refactoring (mostly API and GLES preparations) (#144) 2018-09-14 10:37:20 +03:00
sprite.h Rendering system rewrite, tons of refactoring, optimizations, and other cool stuff (#116) 2018-04-12 17:08:48 +03:00
texture.c Support 16-bit uint and 32-bit float textures 2018-10-19 05:27:54 +03:00
texture.h support mipmaps and anisotropy (not used until we have premultiplied alpha) 2018-07-11 14:55:08 +03:00