View Issue Details

IDProjectCategoryView StatusLast Update
0006649The Dark ModCodingpublic27.12.2025 22:30
Reporterstgatilov Assigned Tostgatilov  
PrioritynormalSeveritynormalReproducibilitysometimes
Status resolvedResolutionfixed 
Product VersionTDM 2.13 
Target VersionTDM 2.14Fixed in VersionTDM 2.14 
Summary0006649: Light estimate system returns full shadow for parallel lights
DescriptionLight estimate system casts ray between query point and light point to check if the point is in shadow.
Parallel lights are a bit hacky, since their light origin is very far away, outside visleafs.
Right now this is considered to be "always in shadow", which is not good.
Steps To ReproduceI noticed this issue on the upcoming "Displacement" mission.
TagsNo tags attached.

Relationships

related to 0006546 feedbackstgatilov Proper system for measuring light factor of bodies 

Activities

stgatilov

stgatilov

27.12.2025 22:30

administrator   ~0017100

I fixed two things to make it work properly:
  r11069 Don't use BSP optimization for shadow rays for lights which have origin in the void (in LightQuerySystem).
      (parallelSky light has its origin far in the void, so the "fast" BSP trace always detects immediate intersection)
  r11068 R_LocalTrace can know find two-sided intersection or frontsided intersections only, based on flag.
  r11070 Now idRenderWorldLocal::TraceAll treats all model surfaces as two-sided when intersecting with a ray.
      (raycasting a rendermodel used to only count frontfacing intersections and we picked the unlucky side)

Also optimized the shadow rays in this case a little bit:
  r11067 Added r_useNodeCommonChildren kind of optimization to idRenderWorldLocal::BoundsInAreas_r.

Issue History

Date Modified Username Field Change
27.12.2025 12:01 stgatilov New Issue
27.12.2025 12:01 stgatilov Status new => assigned
27.12.2025 12:01 stgatilov Assigned To => stgatilov
27.12.2025 12:02 stgatilov Relationship added related to 0006546
27.12.2025 22:30 stgatilov Note Added: 0017100
27.12.2025 22:30 stgatilov Status assigned => resolved
27.12.2025 22:30 stgatilov Resolution open => fixed
27.12.2025 22:30 stgatilov Fixed in Version => TDM 2.14