Rise
The Vieneo Province
Loading...
Searching...
No Matches
Windshield Damage tests

Checks windshield damage through the legacy reference graphics fixture.

Subsystem: Rain, windshields and wipers
Fixture/harness: windshielddamagetests
Setup: The standalone WindshieldDamageTests harness owns the inputs, local helpers and assertion sink used by the case files below.

Build/entry point: Tests/WindshieldDamageTests.vcxproj; declared configurations: Debug|Win32.

WindshieldDamageTests.cpp

Source: Tests/WindshieldDamageTests.cpp

Entry-point checks

Fixture: Windshield Damage tests
Case symbol: main
Source: Tests/WindshieldDamageTests.cpp:82

Test
Entry-point checks: transparent crack regions preserve original glass outside sparse stress lines; opaque fractures receive light even over mostly clear glass; partial fracture alpha composites over existing glass alpha.
Source check messages (including original failure wording)

  • create hidden device window
  • create Direct3D9
  • create offscreen HAL device
  • compile shipped effect
  • select shipped technique
  • create render target
  • create readback
  • bind target
  • disable depth
  • disable culling
  • capture straight shader output
  • set glass vertex format
  • set world
  • set projection
  • set ambient
  • set sunlight
  • set radiosity
  • create test texture
  • lock test texture
  • unlock test texture
  • bind base glass
  • set damage flag
  • bind crack texture
  • clear target
  • begin scene
  • begin effect
  • begin windshield pass
  • draw glass
  • end windshield pass
  • end effect
  • end scene
  • read rendered glass
  • lock rendered glass
  • unlock rendered glass
  • glass actually rendered
  • transparent crack regions preserve original glass outside sparse stress lines
  • opaque fractures receive light even over mostly clear glass
  • partial fracture alpha composites over existing glass alpha
  • bind fully clear glass
  • fractures remain visible over fully clear glass
  • restore base glass
  • create marker atlas
  • lock marker atlas
  • unlock marker atlas
  • atlas filtering never blends neighboring variants
  • atlas sample stays within one tile
  • each glass cell selects exactly one fracture variant without atlas bleed
  • all four fracture variants are sampled
  • load shipped crack DDS using runtime settings
  • read texture description
  • 1024-square DXT5 asset
  • read atlas surface
  • create decoded atlas
  • decode atlas
  • lock decoded atlas
  • each compressed fracture tile has a clear padded border
  • every atlas variant has sparse visible fractures
  • unlock decoded atlas
  • DDS contains four different fracture silhouettes
  • intact windshield ignores shipped cracks
  • at least 85 percent of windshield remains unchanged
  • shipped fracture pattern is visible
  • save optional preview
  • repair removes crack overlay
  • pattern is stable across frames
  • full windshield has sparse visible fractures
  • fractures do not clip or wrap at cell borders
  • neighboring cells show different impact patterns
  • UV view movement preserves the pattern on the glass
  • zero hitpoints has dense safety-glass damage
  • degrading glass never removes or moves an existing crack
  • visible fracture accumulation follows linear damage
  • severe damage is stable across frames
  • severe fracture network remains attached to glass when the view moves
  • safety-glass fractures span every region of the pane
  • repair disables even maximum fracture progression
  • repair to 95 restores the initial pattern exactly
  • visible fractures on shipped front windshield
  • shipped windshield retains clear space
  • shipped mesh retains initial cracks at zero
  • shipped mesh gains widespread cracks at zero
  • repair clears shipped windshield