View Issue Details

IDProjectCategoryView StatusLast Update
0005860The Dark ModTexturespublic11.01.2022 05:02
ReporterBikerdude Assigned Tostgatilov  
PrioritynormalSeveritynormalReproducibilityalways
Status resolvedResolutionfixed 
PlatformPCOSWindowsOS Version10 (21H1)
Product VersionTDM 2.10 
Target VersionTDM 2.10Fixed in VersionTDM 2.10 
Summary0005860: Texture broken by 2.10: lights/cloudscroll
DescriptionThis light texture keeps disappearing in-game under 2.10, works as expected under 2.09

lights/cloudscroll
{
    {
        forceHighQuality
        map lights/cloudscroll
        colored
        translate time * 0 , time * -0.05
    }
}
Steps To ReproduceI have attached a basic test map.
TagsNo tags attached.

Relationships

related to 0005529 resolvedduzenko Projected lights can't use appropriate falloff images 
related to 0005876 resolvedstgatilov Stripped bright line on the boundary of light volume 

Activities

Bikerdude

Bikerdude

31.12.2021 13:58

reporter  

Bikerdude

Bikerdude

31.12.2021 16:35

reporter   ~0014622

cave.map (3,575,879 bytes)
Dragofer

Dragofer

02.01.2022 09:58

developer   ~0014628

This texture is used in quite a few existing maps, i.e. Down by the Riverside.
Bikerdude

Bikerdude

02.01.2022 11:46

reporter   ~0014631

Don't know is this helps, but the texture does come back and then disappear again. Sorta in my mind like its on some giant rotator etc.
stgatilov

stgatilov

04.01.2022 07:01

administrator   ~0014642

It was broken by 0005529, more specifically by disabling any lighting outside light volume for projected lights.
stgatilov

stgatilov

04.01.2022 07:08

administrator   ~0014643

Here is what I see in RB_CreateSingleDrawInteractions:
        // now multiply the texgen by the light texture matrix
        if ( lightStage->texture.hasMatrix ) {
            RB_GetShaderTextureMatrix( lightRegs, &lightStage->texture, backEnd.lightTextureMatrix );
            RB_BakeTextureMatrixIntoTexgen( reinterpret_cast<class idPlane *>(inter.lightProjection), backEnd.lightTextureMatrix );
        }
Basically, the matrix which defines the light volume is multiplied by the matrix defining texcoords adjustment, making it impossible to know where light frustum is in the shader.

I'm afraid we have to pass the texcoords transformation separately.
stgatilov

stgatilov

06.01.2022 06:00

administrator   ~0014645

Fixed in svn rev 9780.

Now light texture transformation matrix is not "baked" into light volume matrix, but instead passed separately.
As the result, now we force to zero light value for all fragments outside light volume (instead of those who have texcoords outside [0..1]).

As a side benefit, now volumetric lights take light texture transformation into account.
Bikerdude

Bikerdude

06.01.2022 10:47

reporter   ~0014646

Thanks for sorting this fella :-)

Issue History

Date Modified Username Field Change
31.12.2021 13:58 Bikerdude New Issue
31.12.2021 13:58 Bikerdude File Added: broken_cloudscroll.mp4
31.12.2021 16:34 Bikerdude Description Updated
31.12.2021 16:34 Bikerdude Steps to Reproduce Updated
31.12.2021 16:35 Bikerdude Note Added: 0014622
31.12.2021 16:35 Bikerdude File Added: cave.map
31.12.2021 16:39 Bikerdude Product Version TDM 2.09 => SVN
02.01.2022 09:57 Dragofer Target Version => TDM 2.10
02.01.2022 09:57 Dragofer Summary Broken texture - lights/cloudscroll => Texture broken by 2.10: lights/cloudscroll
02.01.2022 09:58 Dragofer Note Added: 0014628
02.01.2022 11:46 Bikerdude Note Added: 0014631
04.01.2022 07:01 stgatilov Note Added: 0014642
04.01.2022 07:01 stgatilov Relationship added related to 0005529
04.01.2022 07:08 stgatilov Note Added: 0014643
06.01.2022 06:00 stgatilov Note Added: 0014645
06.01.2022 06:00 stgatilov Product Version SVN => TDM 2.10
06.01.2022 06:00 stgatilov Assigned To => stgatilov
06.01.2022 06:00 stgatilov Status new => resolved
06.01.2022 06:00 stgatilov Resolution open => fixed
06.01.2022 06:00 stgatilov Fixed in Version => TDM 2.10
06.01.2022 10:47 Bikerdude Note Added: 0014646
11.01.2022 05:02 stgatilov Relationship added related to 0005876