RainyGlassShader — Toadstorm
Upstream: https://github.com/toadstorm/RainyGlassShader
License: GNU Lesser General Public License, version 2.1 (COPYING.LESSER).

FS25 adaptation, 2026-10-22:
- Converted the original four-channel droplets_mask and rivulets_mask TIFFs
  to linear RGBA8 DDS, retaining all four channels and supplying mipmaps.
- Ported the raindrop erosion and dual-phase rivulet flow to GIANTS CustomShader
  version 5 in ../../shaders/toadstormRainShader.xml.
- Replaced Unity-specific surface macros/screen capture with GIANTS normals,
  alpha and lighting. Unity GrabPass/background refraction is NOT implemented.
- Added a simulation clock, per-pane offsets, rain intensity and scale controls.

The adapted shader and converted maps remain under LGPL-2.1. Their editable
shader source is included in the mod. Unmodified upstream shader source and
README and original 16-bit TIFF source are included under upstream/.
The upstream unitypackage digest and conversion details are recorded
in SOURCE_MANIFEST.json. The deterministic conversion script is included here.
RainVision Dynamic project identity and direction: Dub4u.
See ../../CREDITOS.txt for the visual resource credits. The LGPL-2.1 notice
above applies to the adapted shader and converted maps identified here.

0.3.1 correction: explicitly pass ObjectParameters to the texture-sampling
helper, providing the object context required by GIANTS bindless texture access.

0.3.2 tuning: default drop size 35% of the previous size; appearance rate 65%
of the previous rate. Added gradual phase-boundary fades and independent
per-vehicle appearance/flow controls. Material texture-context fix retained.

Update 0.3.3 / package 1.0.0.63, 2026-10-22:
- Based on the user-supplied package 1.0.0.61, not the heavy-stream experiment.
- Kept the original Toadstorm source textures and their four linear channels.
- Added per-drop lifetime variation using the original B time seed.
- Added procedural moving drop heads with lane-dependent sizes/speeds and
  fading beaded tails. These additions to the adapted shader use LGPL-2.1.
- Increased default impact multiplier from 0.65 to 0.95 and flow from 1 to 1.8.
- Added world tangent/bitangent up projection at the documented GIANTS
  POST_GET_WORLD_POSE_VS injection. No normal-map pass: keep original mapping.
- Only clearly sideways UV charts are automatically rotated by +/-90 degrees;
  already vertical UVs keep the previous orientation. Normal offsets rotate
  back into the original tangent basis. Manual rotation is local to one pane.
- Native GIANTS compilation, mesh tangent validity, lighting and performance
  require an in-game test. No background refraction or geometric wiper mask
  was added. No changes were made to original vehicle models or materials.


Update 0.3.4 / package 1.0.0.64, 2026-10-22:
- Based on the approved 1.0.0.63 package. No external paid shader imported.
- Light presets 1-2 recover the 0.3.2 field, spawn 0.65 and flow 1, with
  lifetime variation and procedural runners disabled. UV repair is retained.
- Heavy presets 3-4 use spawn 1.15, flow 2.2, variation 0.85, rivulet strength
  0.72, opacity multiplier 1.1 and an independently phased impact layer.
- Both profiles use the original maps and the same 0.35 drop scale.
- Rain preset lookup reads current forecast instance/object metadata, counts
  rain objects independently of other weather types and supports variations
  arrays. Where unavailable, normalized live rainfall supplies a fallback.
- Two independent integrated clocks preserve animation phase as profile/speed
  changes. rgRainState.x now carries integrated impact phase; rgToadstorm
  carries flow seconds, scroll offset, strength and integrated flow phase;
  rgRainVisual.w carries the heavy-profile blend. Parameter names retained.
- Added reversible rgRainTest 1..4. Previous whole-pane wiper behaviour and
  manual pane rotation are retained. Native GIANTS verification remains an
  in-game step. Shader adaptation additions continue under LGPL-2.1.


Update 0.3.5 / package 1.0.0.65, 2026-10-22:
- Preserves approved 0.3.4 rain profiles, textures, animation clocks and UV repair.
- Added a rotational front-wiper mask based on existing FS25 animation nodes
  (AnimationValueFloat rotation node/startValue/endValue) and geometry bounds.
- Tracks up to two independent front motors and their actual direction changes,
  pauses and strokes; retains three observed stroke records per motor.
- Plane-space affine rows map each cloned pane's mesh coordinates to metres,
  independent of UV orientation and camera/world origin. Does not modify the
  vehicle's geometry or drive its animation. The blade's annular arc/radial
  extent is an approximation based on its geometry bounding sphere; linkage,
  pantograph and unconventional meshes may need model-specific work.
- Reconstructs local time since wiping in the shader and refills rain gradually;
  default refill varies from 8 seconds (dry/light) to 3 seconds (heavy).
- Unsupported models/materials keep the previous whole-pane clearing.
- Added reversible per-vehicle diagnostics/calibration and retained test rain
  while wipers are used. No background refraction or physical droplet collision
  was added. Native GIANTS compilation and real models require in-game testing.
- Shader additions continue under LGPL-2.1.

Package 1.0.0.66, 2026-10-22: RainVision by Dub4u identity update.
- Updated visible title, edition author, icon, shop brand and display strings.
- Rain renderer, profiles, maps and wiper behaviour remain as in 0.3.5.
- Upstream source, copyright and license files retained.

Package 1.0.0.67 / adaptation 0.3.6, 2026-10-22:
- RainVision Dynamic identity and simple windshield/wiper icon.
- Added documented curvesByNode keyframe rotation discovery alongside
  AnimationValueFloat and older parts; includes full-curve rotation ranges.
- Retry missing/late animation metadata; refresh front rain-pane classification.
- Compatibility clearing observes native wiper animation movement as well
  as manual mode. Added discovery/pane diagnostics and manual rescan.
- Shader, rain profiles, material parameters and original textures unchanged.
- Verified with the public FS25 loader in a mocked scene and Mesa shader
  rendering; in-game vehicle alignment remains to be confirmed.

Package 1.0.0.68 / adaptation 0.3.7, 2026-10-22:
- Read documented geometry/shape/world bounds and validate world-space radii
  after model scaling; malformed bounds can use the next reader.
- If blade bounds cannot be used, optionally estimate an annular arc from a
  front glass sphere and the animation rotation range. This approximation is
  explicitly labelled glass estimate and can be disabled per vehicle/session.
- Observe actual node rotation for compatibility clearing without native time
  access; preserve motion samples over rediscovery and improve diagnostics.
- Shader, rain profiles, original textures, icon and upstream sources unchanged.
- Mocked-scene/API regressions and Mesa rendering pass; actual Zetor model
  geometry and in-game alignment were not available for native verification.
Bounds APIs: https://gdn.giants-software.com/documentation_scripting_fs25.php?version=engine&category=24&function=685
https://gdn.giants-software.com/documentation_scripting_fs25.php?version=engine&category=24&function=687
https://gdn.giants-software.com/documentation_scripting_fs25.php?version=engine&category=24&function=690

Package 1.0.0.69 / adaptation 0.3.8, 2026-10-22:
- Use native worldPosition in POST_GET_WORLD_POSE_VS instead of raw In.position
  for wiper mask coordinates. CPU plane rows now use world axes and offsets.
- Added rgWiperOrigin to correct a difference between CPU node origin and the
  native instance.modelMatrix render origin, including rebased rendering.
- Added a four-second, explicit all-window clear diagnostic that bypasses
  geometry; local visual state only, no savegame/weather changes.
- Material parameter readback and skinning diagnostics help separate masking,
  material binding and coordinate failures. This is not a GPU pixel readback.
- Original rain maps, profiles and water animation settings remain unchanged.
- Shader modifications continue under LGPL-2.1, with editable source included.
- Native FS25 compilation and actual model alignment remain unverified here.
- Internal shader variation renamed rainyGlass038 to isolate this compilation
  from previously cached experimental variants. Material reference updated.

Package 1.0.0.70 / adaptation 0.3.9, 2026-10-22:
- Restored CDATA around every shader CodeInjection and Variation body.
  Package 1.0.0.69 had lost these blocks during XML serialization; the user's
  FS25 log then reported FLEX Unknown char # and rejected the GISL shader.
- Shader injection text is byte-for-byte equivalent after XML parsing;
  original rain fields, profiles and wiper mask math are preserved.
- Internal variation rainyGlass039 and the material reference match.
- Validation checks raw CDATA preservation and package resources as well as
  the existing Lua and Mesa regressions. Mesa is not the native GISL compiler;
  FS25 compilation and the actual wiper clearing remain to be confirmed.

Package 1.0.0.71 / adaptation 0.4.0, 2026-10-22:
- Changed wiping to a two-dimensional visibility fade. The original rain field
  runs continuously; the mask directly attenuates alpha, reflection and normal
  relief instead of changing rain spawn thresholds inside the wiped region.
- Each rigid pane projects its raw mesh points through CPU-supplied local rows
  in the vertex stage. Skinned panes retain the post-deformation world route.
  Rain UV mapping and 90-degree repair do not control the wipe orientation.
- Removed default blade-depth and radial clipping from the visibility mask.
  The old estimated bounds could reject the entire windshield. Manual radius
  calibration remains an opt-in clipping feature.
- Native observed wiper stroke history controls clearing. Return is gradual,
  around 2.5-4 seconds by weather intensity; stopped wipers do not hold it clear.
- Rain profiles, original map files, branding and attribution are retained.
- Variation rainyGlass040, CDATA and matching material binding are preserved.
- Lua mocked-scene and Mesa tests exercise actual shipped code and packets.
  They do not substitute for native GISL compilation or real vehicle alignment.
  This is an approximate visual effect, not physical water/wiper simulation.

Package 1.0.0.72 / adaptation 0.4.1 (test build), 2026-10-22:
- Wiper coordinates of rigid panes are written at POST_SET_TEXCOORDS_VS,
  next to the rain UVs. The 0.4.0 world-pose route and a world-space route
  stay selectable at run time (rgWiperOrigin.w).
- Zero coordinates never clear a pane (atan2(0,0) guard).
- Added rgWiperDebug and diagnostic views (material, parameters, coordinates,
  live blade, mask, fixed half, live wedge). rgWiperN1/N2 (unused) removed.
- Rain field, profiles, maps and the approved look are unchanged.
- These shader additions continue under LGPL-2.1. Variation rainyGlass041.
- Native GISL compilation and in-game clearing remain to be confirmed.


Package 1.0.0.73, 2026-10-23: presentation update.
- Rewrote all four store descriptions around RainVision Dynamic and Dub4u.
- Updated the readme and project credit presentation.
- Removed store claims of confirmed localized wiper clearing.
- Installation filename: FS25_RainVisionDynamic.zip. Default namespace strings
  follow the new mod filename; runtime registration already uses g_currentModName.
- Rain shader implementation, maps, upstream source and license texts are unchanged.

Package 1.0.0.74, 2026-10-23: rain-only icon.
- New flat cabin-window icon with white droplets and water trails on dark
  charcoal, lime green outline and RainVision Dynamic lettering.
- The artwork contains no wiper, movement arrow or wiped/cleared sector.
- Both mod and shop-brand icon references use icon_rainVisionDynamic.dds.
- Game code, rain shaders, profiles, maps and third-party licenses are unchanged.
