View Issue Details

IDProjectCategoryView StatusLast Update
0004364The Dark ModFeature proposalpublic26.12.2018 18:04
Reporternbohr1more Assigned Toduzenko  
PrioritynormalSeveritynormalReproducibilityalways
Status assignedResolutionopen 
PlatformALLOSOS Version
Product VersionSVN 
Target VersionTDM 2.08Fixed in Version 
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. 
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

View 3 revisions

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

View 6 revisions

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

View 3 revisions

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

View 4 revisions

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

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 View Revisions
11.09.2016 13:32 nbohr1more Note Added: 0008313
11.09.2016 13:34 nbohr1more Note Edited: 0008313 View Revisions
11.09.2016 13:34 nbohr1more Note Edited: 0008313 View Revisions
11.09.2016 21:50 nbohr1more Note Edited: 0008313 View Revisions
11.09.2016 21:55 nbohr1more Note Edited: 0008313 View Revisions
12.09.2016 14:45 nbohr1more Note Edited: 0008313 View Revisions
12.09.2016 15:43 nbohr1more Note Edited: 0008312 View Revisions
13.09.2016 18:56 nbohr1more Note Added: 0008315
13.09.2016 19:03 nbohr1more Note Edited: 0008315 View Revisions
13.09.2016 19:33 nbohr1more Note Added: 0008316
13.09.2016 19:47 nbohr1more Note Edited: 0008316 View Revisions
13.09.2016 19:54 nbohr1more Note Edited: 0008315 View Revisions
13.09.2016 20:34 nbohr1more Note Edited: 0008316 View Revisions
13.09.2016 20:35 nbohr1more Note Edited: 0008316 View Revisions
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 View Revisions
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