View Issue Details

IDProjectCategoryView StatusLast Update
0005044The Dark ModGraphicspublic18.08.2019 15:04
ReporterVanishedOne Assigned To 
PrioritynormalSeveritynormalReproducibilityalways
Status newResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0005044: Adjusting specular RGB in material stages fails under enhanced interaction shader
DescriptionWhat I brought up previously here:
http://forums.thedarkmod.com/index.php?/topic/9082-newbie-darkradiant-questions/page/313/&tab=comments#comment-414038
http://forums.thedarkmod.com/index.php?/topic/9082-newbie-darkradiant-questions/page/313/&tab=comments#comment-414162

According to http://forums.thedarkmod.com/index.php?/topic/11893-ungoliants-mapping-questions/page/14/&tab=comments#comment-333417 the enhanced interaction shader written to replace D3's broke the ability to write stages like

{
blend specularmap
map _white
rgb 0.1 // only works under the simple shader
}

The GLSL shader has inherited this behaviour. If that were changed we could reuse textures more effectively (often TDM specular maps are just darker versions of the diffuse maps) and tweak materials more easily.

Currently the enhanced shader actually takes RGB scaling from the diffuse stage, so if a material has e.g. "rgb 0.1" in the diffuse stage it affects diffuse *and* specular colour under the enhanced shader. (Changing this behaviour could therefore affect the look of some existing materials under the enhanced shader, but it would resolve inconsistency between shader settings, giving material authors better control.)
Additional InformationIn D3 rgb fading was even used to transition between diffuse and specular maps, as seen here:

models/characters/player/player_phantasm
{
        noselfshadow
        clamp
// blended part
    
    {
        blend bumpmap
        map addnormals(models/characters/player/playerhead_local.tga, heightmap(models/characters/player/playerhead_h.tga, 3 ) )
    // note that you do NOT put vertexColor on the bumpmap
    }
    {
        blend diffusemap
        map models/characters/player/playerhead.tga
        rgb 1-death_fade[(time+Parm4)*.4]
    }
    {
        blend specularmap
        map models/characters/player/playerhead_s.tga
        rgb 1-death_fade[(time+Parm4)*.4]
    }
// inverse blended part
    {
        blend bumpmap
        map addnormals(models/characters/player/playerheaddead_local.tga, heightmap(models/characters/player/playerhead_h.tga, 8 ) )
    }
    {
        blend diffusemap
        map models/characters/player/playerheaddead.tga
        rgb death_fade[(time+Parm4)*.4]
    }
    {
        blend specularmap
        map models/characters/player/playerheaddead_s.tga
        rgb death_fade[(time+Parm4)*.4]
    }
}
TagsNo tags attached.

Relationships

related to 0005043 new RGBA keywords have no effect in cubemap stages if material has light interaction 

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
17.08.2019 16:42 VanishedOne New Issue
17.08.2019 16:42 VanishedOne Relationship added related to 0005043
17.08.2019 16:51 VanishedOne Description Updated View Revisions
18.08.2019 13:03 VanishedOne Description Updated View Revisions
18.08.2019 13:05 VanishedOne Description Updated View Revisions
18.08.2019 15:04 VanishedOne Severity feature => normal