View Issue Details

IDProjectCategoryView StatusLast Update
0004364The Dark ModFeature proposalpublic30.01.2022 20:58
Reporternbohr1more Assigned Tostgatilov  
PriorityhighSeveritynormalReproducibilityalways
Status resolvedResolutionfixed 
PlatformALL 
Product VersionSVN 
Target VersionTDM 2.10Fixed in VersionTDM 2.10 
Summary0004364: RGTC Normal Map compression
DescriptionSerpentine added some code for LATC loading in TDM but was planning on automating the conversion process and found that Intel does not support LATC so RGTC was planned as a replacement.

In lieu of automating the conversion, we could probably just add the format and externally convert the textures in batches.
Additional Informationhttps://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_texture_compression_rgtc.txt
TagsNo tags attached.

Relationships

parent of 0004928 closedSpringheel Gold texture is wrong 
parent of 0004923 resolvedduzenko Lighting issue with 2.07 beta. 
parent of 0005544 resolvedorbweaver DDS normalmap textures seem to be ignored 
related to 0005716 resolvedstgatilov Implement RGTC compressor 
child of 0003684 new Investigate GPL Renderer Improvements 

Activities

nbohr1more

nbohr1more

16.08.2016 22:13

developer   ~0008269

External work:

https://github.com/revelator/The-Darkmod-Experimental/commit/d4fcae9ce064b6020a8f7e11210aab36160f2a9e

https://github.com/revelator/The-Darkmod-Experimental/commit/e844559504fcd26a7061c3fa9af7c087d50a6ab9

Need to double-check and assumptions and create test assets.
nbohr1more

nbohr1more

16.08.2016 22:15

developer   ~0008270

Recent Discussion:

http://forums.thedarkmod.com/topic/18280-texture-file-size-project-reduce-loading-time-and-vram-requirement/#entry393250

Key Point:

If this project fails, the other option is to compress only low-detail normal maps with RxGB and encode high-detail normal maps as uncompressed DDS with mip-maps.
nbohr1more

nbohr1more

19.08.2016 23:35

developer   ~0008275

It seems that the swizzle is already disabled so RxGB cannot be used until that change is reverted.
nbohr1more

nbohr1more

08.09.2016 21:47

developer   ~0008312

Last edited: 12.09.2016 15:43

RGTC may need a specific shader implementation.

Perhaps use cgc to convert the GLSL implementation here:

https://github.com/eXistence/fhDOOM/commit/6de59bde47824f1e678a045d91ec660a4c66247d

cgc:

http://http.developer.nvidia.com/Cg/cgc.html

Will need to test because I am getting some (conflicting) reports that RGTC decodes in hardware to a standard RGBA image that the shader can read natively.

nbohr1more

nbohr1more

11.09.2016 13:32

developer   ~0008313

Last edited: 12.09.2016 14:45

For the contingency where RGTC does not render as RGBA to the ARB bind, the best option I can think of is to create a new SL_BUMPC map type and bumpcImage with associated GL texture client then selectively populate them depending on compression args, missing images, etc.

nbohr1more

nbohr1more

13.09.2016 18:56

developer   ~0008315

Last edited: 13.09.2016 19:54

Encoding details:

http://ptgmedia.pearsoncmg.com/images/9780321552624/downloads/0321552628_AppK.pdf

Another implementation:

https://github.com/ioquake/ioq3/blob/master/code/renderergl2/tr_image_dds.c

and another

http://trac.openscenegraph.org/projects/osg//changeset/11710/

nbohr1more

nbohr1more

13.09.2016 19:33

developer   ~0008316

Last edited: 13.09.2016 20:35

RGTC2 (unsigned) = BC5U

GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD

According to GPU whiz Aras P.

BC5 = ATI2N_XY

https://github.com/GPUOpen-Tools/Compressonator/commit/de71057d788683a2093fc85fd78c07111aac8825

Why is this so darned unclear that even AMD has to be corrected by application devs...

nbohr1more

nbohr1more

24.09.2017 14:56

developer   ~0009341

http://forums.thedarkmod.com/topic/19064-glsl-interaction-shader/page-4#entry411600
nbohr1more

nbohr1more

24.09.2017 14:57

developer   ~0009342

Some work done but it's not likely to be complete before 2.06 code freeze.
duzenko

duzenko

10.06.2018 11:01

developer   ~0010511

Svn rev 7444.
Compression to RGTC when loading uncompressed normal maps with image_useNormalCompression = 2.
I can't see significant memory usage improvements though.
TODO: allow loading pre-compressed normal maps.
For that I would need a test map with two bump materials: normal and precompressed for comparision.
duzenko

duzenko

10.06.2018 13:21

developer   ~0010512

Edited interaction shader to support this
duzenko

duzenko

22.03.2020 18:14

developer   ~0012297

Moving to 2.09 because the assets have not been converted yet
stgatilov

stgatilov

31.08.2020 17:02

administrator   ~0012771

I suggest moving it to 2.10.

In 2.09, all shaders are fixed to work with RGTC compression.
Also, it are turned on by default.
We can see how 2.09 beta goes with RGTC on, and if nobody complains about it, do assets conversion shortly after 2.09 is released.

Issue History

Date Modified Username Field Change
16.08.2016 22:08 nbohr1more New Issue
16.08.2016 22:08 nbohr1more Status new => assigned
16.08.2016 22:08 nbohr1more Assigned To => nbohr1more
16.08.2016 22:09 nbohr1more Relationship added related to 0003684
16.08.2016 22:13 nbohr1more Note Added: 0008269
16.08.2016 22:15 nbohr1more Note Added: 0008270
19.08.2016 23:35 nbohr1more Note Added: 0008275
08.09.2016 21:47 nbohr1more Note Added: 0008312
08.09.2016 21:52 nbohr1more Note Edited: 0008312
11.09.2016 13:32 nbohr1more Note Added: 0008313
11.09.2016 13:34 nbohr1more Note Edited: 0008313
11.09.2016 13:34 nbohr1more Note Edited: 0008313
11.09.2016 21:50 nbohr1more Note Edited: 0008313
11.09.2016 21:55 nbohr1more Note Edited: 0008313
12.09.2016 14:45 nbohr1more Note Edited: 0008313
12.09.2016 15:43 nbohr1more Note Edited: 0008312
13.09.2016 18:56 nbohr1more Note Added: 0008315
13.09.2016 19:03 nbohr1more Note Edited: 0008315
13.09.2016 19:33 nbohr1more Note Added: 0008316
13.09.2016 19:47 nbohr1more Note Edited: 0008316
13.09.2016 19:54 nbohr1more Note Edited: 0008315
13.09.2016 20:34 nbohr1more Note Edited: 0008316
13.09.2016 20:35 nbohr1more Note Edited: 0008316
25.10.2016 04:03 nbohr1more Target Version TDM 2.05 => TDM 2.06
24.09.2017 14:56 nbohr1more Note Added: 0009341
24.09.2017 14:57 nbohr1more Note Added: 0009342
24.09.2017 14:57 nbohr1more Target Version TDM 2.06 => TDM 2.07
09.06.2018 18:34 nbohr1more Target Version TDM 2.07 =>
10.06.2018 10:57 duzenko Assigned To nbohr1more => duzenko
10.06.2018 10:57 duzenko Target Version => TDM 2.07
10.06.2018 10:57 duzenko Additional Information Updated
10.06.2018 11:01 duzenko Note Added: 0010511
10.06.2018 13:21 duzenko Note Added: 0010512
25.06.2018 06:27 nbohr1more Target Version TDM 2.07 => TDM 2.08
17.07.2018 16:11 nbohr1more Relationship deleted related to 0003684
17.07.2018 16:11 nbohr1more Relationship added child of 0003684
26.12.2018 18:03 nbohr1more Relationship added parent of 0004928
26.12.2018 18:04 nbohr1more Relationship added parent of 0004923
22.03.2020 18:13 duzenko Target Version TDM 2.08 => TDM 2.09
22.03.2020 18:14 duzenko Note Added: 0012297
31.08.2020 17:02 stgatilov Note Added: 0012771
05.12.2020 12:44 stgatilov Assigned To duzenko =>
05.12.2020 12:44 stgatilov Priority normal => high
05.12.2020 12:44 stgatilov Status assigned => confirmed
05.12.2020 12:44 stgatilov Target Version TDM 2.09 => TDM 2.10
18.08.2021 10:59 stgatilov Relationship added related to 0005716
03.10.2021 20:49 nbohr1more Assigned To => stgatilov
03.10.2021 20:49 nbohr1more Status confirmed => feedback
05.10.2021 04:00 nbohr1more Relationship added parent of 0005544
30.01.2022 20:58 nbohr1more Status feedback => resolved
30.01.2022 20:58 nbohr1more Resolution open => fixed
30.01.2022 20:58 nbohr1more Fixed in Version => TDM 2.10