baldurk
4de38aef1e
Fix issue with DDS writing reading from wrong subresource index for data
2021-02-24 13:52:07 +00:00
baldurk
04e533742f
Adjust pitch calculation in saved DDS files to match spec. Closes #2189
...
* The spec is not particularly clear but this matches the DirectXTex behaviour
which is as close to 'official' as we'll get most likely.
2021-02-22 17:03:12 +00:00
baldurk
11268b358a
Remap block-compressed 3D textures to 2D arrays on GL. Closes #2186
2021-02-22 12:38:43 +00:00
baldurk
026da176bb
Update copyright years to 2021
2021-01-13 13:56:10 +00:00
baldurk
fa24dc8872
Silence some PVS warnings
2020-08-20 16:11:05 +01:00
baldurk
27db02b7e2
Handle legacy DDS headers for more than just RGBA8. Closes #1888
...
* DirectXTex seems to emit legacy DDS headers for any UNORM format less than
32-bit per pixel, so we do the same.
2020-05-18 15:20:58 +01:00
baldurk
d0bd2e8da2
Fix calculation of number of rows in block DDS formats. Closes #1870
...
* The number of rows should be the ceiling of the 4-row number, since any
overlap becomes a whole extra row of blocks.
2020-05-07 12:37:06 +01:00
baldurk
6f2dfc1a2b
Add support for non-compressed formats in DDS shell preview
2020-04-01 16:55:58 +01:00
Arvastra and Baldur Karlsson
d7af989746
Tidying up.
2020-03-19 17:16:01 +00:00
Arvastra and Baldur Karlsson
482114f6f4
Display Thumbnails for dds files.
2020-03-19 17:16:01 +00:00
baldurk
310011999f
Add bounds checking for DDS header values
2020-03-12 11:07:58 +00:00
baldurk
ec5e63a53f
Ensure component count is set correctly for special formats. Refs #1688
2020-01-17 19:53:38 +00:00
baldurk
2916c0f9f7
Update copyright years to 2020
2020-01-06 16:20:45 +00:00
baldurk
f68645bddc
Reduce dependencies pulled in by common.h
2019-12-16 17:06:16 +00:00
baldurk
222816c537
Fix check for DDS flags not to be equality
2019-12-13 12:27:40 +00:00
baldurk
6d1d302491
Fix a number of warnings identified by higher clang warning levels
...
* We enable a couple of high signal-to-noise warnings in all clang builds
2019-12-02 20:41:28 +00:00
baldurk
03d064beb0
Tighten up handling of unsupported DXGI formats in DDS read/write
2019-11-25 23:36:45 +00:00
baldurk
07dc55c39d
Handle depth formats better in DDS loading
2019-11-20 18:37:43 +00:00
baldurk
111ca43800
Fix handling of sub-8bit packed formats in DDS
2019-11-20 18:37:43 +00:00
baldurk
d955c5b00c
Change defaults when saving DDS to favour unorm variants
2019-11-13 10:11:39 +00:00
baldurk
a8baf4fa49
Fix compile error
2019-10-28 19:25:02 +00:00
baldurk
b9fbdc0ff0
Add explicit error for legacy CxV8U8 texture format
2019-10-28 12:04:05 +00:00
baldurk
0fe6be3ac6
Support YUY2/UYVY formats in DDS files
...
* These can only be supported if the proxy texture can be created
2019-10-28 12:03:50 +00:00
baldurk
ec29e92abf
Add support for old D32F_LOCKABLE format
2019-10-28 11:27:55 +00:00
baldurk
15c0244fd4
Add support for DXT2 / DXT4 aliases of DXT3 (BC2) and DXT5 (BC3)
...
* The only difference in these is whether or not pre-multiplied alpha is assumed
to be used, and that doesn't change the actual data - only the interpretation.
2019-10-28 11:23:37 +00:00
baldurk
e525630a17
Add special resource type for A8_UNORM. Closes #1426
...
* While it's redundant this format is still valid in D3D so needs to be handled
correctly.
2019-06-25 19:08:07 +01:00
baldurk
8ffe33767c
Handle UNormSRGB in some places that were missing handling
2019-04-23 16:31:18 +01:00
baldurk
86ff87863e
Update copyright years to 2019
2019-02-01 18:32:13 +00:00
baldurk
44da10be06
Change SRGB to be a component type, not a ResourceFormat flag
...
* This allows us to have sRGB as a type hint, and better matches API format
types.
* It's currently impossible and unlikely to ever be the case that srgb is
applied to anything other than UNorm, so having it be independent from the
component type was a degree of freedom that was unused.
2019-01-14 13:19:59 +00:00
baldurk
2237c241ff
Fix incorrectly named methods in ResourceFormat
...
* We try to maintain at least an internally consistent naming scheme for the
python/public interface, even if it doesn't match python naming schemes.
2019-01-03 12:22:29 +00:00
baldurk
68b23c5f62
Add support for YUV resource formats
...
* We handle 4:4:4, 4:2:2, and 4:2:0, with packed, 2-plane and 3-plane formats,
for 8, 10, 12, and 16 bit depths.
* This covers most common formats but still leaves a few out - NV11, palettised
formats, V208/V408 JPG formats.
2018-12-11 19:57:20 +00:00
baldurk
2411ce70ea
Add flags to ResourceFormat to replace bgraOrder/srgbCorrected
...
* Allows for future expansion as well
2018-12-11 19:57:20 +00:00
baldurk
e305029ddd
Update copyright years to 2018
2018-01-01 17:55:29 +00:00
baldurk
40a0272a3e
Remove use of bool32 replay API type&optimise mem layout in some structs
2017-08-24 10:44:45 +01:00
baldurk
e85c8d19bf
Combine 'special' with 'specialFormat' as single resource format type
...
* There was no good reason to have a flag indicating if the special
format was valid or not. Now it's a single enum, with a value
'Regular' indicating that the compCount/compWidth/compType fully
describe the format itself.
* This makes code patterns easier as you no longer need to check for
special then check for specialFormat, you can just test the type
directly.
2017-08-24 10:37:16 +01:00
baldurk
fdf04cae39
Print better error messages for failures to save textures to disk
2017-06-02 17:59:57 +01:00
baldurk
d40fc8471d
Change API enums to enum class, remove now redundant prefixing
...
* This gives a little nicer syntax, a bit better type safety, and also
reflects better for SWIG bindings. Overall it's a minor change but
better.
* We don't update the C# UI at all, since it's soon to be removed and
not worth the effort/code churn.
* For now so we're ABI compatible with C#, all enums are uint32_t, but
that is an obvious optimisation in future to reduce struct packing.
* We avoid 'None' as an enum value, because it's a reserved word in
python so will cause problems generating bindings.
2017-04-18 14:57:33 +01:00
baldurk
030cbfde9a
Batch update copyright years everywhere
2017-01-06 12:13:31 +00:00
baldurk
8183c0d2ac
Better handling of BGRA8 dds saving and loading
2016-08-19 17:36:36 +02:00
baldurk
504b18ab3f
D32S8 type formats are 8 bytes per pixel, not 5.
2016-07-13 15:52:19 +02:00
EecheE
c52e763e8c
Changed default histogram range to [-1,+1] for snorm textures.
...
If viewing a SNORM texture, default histogram range is set to [-1,1]
instead of [0,1].
Added support for BC5U .dds fourcc code.
2016-06-25 17:14:41 -07:00
baldurk
5f28b745a2
Format code according to newly added clang-format
...
_ /)
mo / )
|/)\)
/\_
\__|=
( )
__)(__
_____/ \\_____
| _ ___ _ ||
| | \ | | \ ||
| | | | | | ||
| |_/ | |_/ ||
| | \ | | ||
| | \ | | ||
| | \. _|_. | . ||
| ||
|repository history||
| ||
* | * ** * ** |** **
\))ejm97/.,(//,,..,,\||(,,.,\\,.((//
2016-05-22 19:41:53 +02:00
baldurk
2e0ffa7813
Batch update copyright years everywhere
2016-02-07 18:50:45 +01:00
baldurk
4b7c33d531
Fixes for vulkan for BGRA changes, add R4G4 special format
2016-02-07 18:49:21 +01:00
baldurk
8b7a025853
Refactor BGRA formats to not be special (so allow any BGRA format)
...
* Also add ASTC and D16S8 types while in the neighbourhood
2015-11-29 22:05:26 +01:00
baldurk
c7cfdcc689
Add basic support for displaying/picking S8 textures. Refs #165
2015-10-25 14:09:43 +01:00
baldurk
5fccf87d43
Only check that DDPF_FOURCC flag is set, not that it's the only flag
2015-09-13 14:06:13 +02:00
baldurk
8ccf071865
Implement GetTextureData for GL - underlying code behind texture saving
...
* This should support all forms of textures off the bat, multisampled
textures, 3D textures, arrays, compressed and uncompressed, etc.
2015-02-09 17:29:13 +00:00
baldurk
940f742e04
Implement DDS reading, add function to quickly check header exists
2014-09-25 16:19:47 +01:00
baldurk
0e6085ea20
DDS writing fixes for cubemaps & 3D textures with mips
2014-09-25 16:19:12 +01:00