View Issue Details

IDProjectCategoryView StatusLast Update
0005834The Dark ModCodingpublic22.08.2022 17:16
Reporterstgatilov Assigned Tostgatilov  
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionduplicate 
Product VersionTDM 2.10 
Target VersionTDM 2.11 
Summary0005834: Refactor: merge interaction and ambient shaders
DescriptionWe have too much code duplication.
Ambient and normal lights are very similar in general, except for:
  1) different diffuse and specular term
  2) ambient occlusion instead of shadows
There is no need to have separate shaders.
Additional InformationSee also:
  https://forums.thedarkmod.com/index.php?/topic/21138-projected-lights-falloff/&do=findComment&comment=466904
TagsNo tags attached.

Relationships

duplicate of 0005828 resolvedstgatilov Try to reduce duplication among shader code. 
related to 0005835 assignedstgatilov Refactor: merge cubic and other lights 
related to 0005285 closedcabalistic Remove old backend's depth/interaction/stencil stages 

Activities

stgatilov

stgatilov

22.08.2022 17:16

administrator   ~0015204

OMG... I created so many tickets about this shaders cleaning, which are mostly duplicates of each other =)

Due to 0005828, now interaction and ambient lighting model are in two pure functions which one can include and use anywhere.
I don't think putting this stuff into single shader will help much, because set of differences are rather big:
 1) ambient uses terms which depend on world normal, while interaction uses normal in tangent space
 2) shadows vs SSAO as mentioned
 3) ambient shader has ambient color tweaks (r_ambientMinLevel and r_ambientGamma)
 4) interaction shader has some rim/fresnel math, which I don't like... but it works as specular amplifier and won't fit in ambient.

Issue History

Date Modified Username Field Change
08.12.2021 04:53 stgatilov New Issue
08.12.2021 04:53 stgatilov Status new => assigned
08.12.2021 04:53 stgatilov Assigned To => stgatilov
08.12.2021 04:59 stgatilov Relationship added related to 0005835
27.12.2021 03:49 stgatilov Relationship added related to 0005285
22.08.2022 17:16 stgatilov Note Added: 0015204
22.08.2022 17:16 stgatilov Relationship added related to 0005828
22.08.2022 17:16 stgatilov Relationship deleted related to 0005828
22.08.2022 17:16 stgatilov Relationship added duplicate of 0005828
22.08.2022 17:16 stgatilov Status assigned => closed
22.08.2022 17:16 stgatilov Resolution open => duplicate