; RemielleBlack

; Constants -------------------------

; === LLMenuEXT ll_pre: Keys / StatesVar / Outfit vars ===

[Constants]
global $active = 0
global $creditinfo = 0
global $activeForMenu = 0
global persist $Dress = 0
global persist $Sleeves = 0
global persist $Collar = 0
global persist $Stockings = 0
global persist $Heels = 0
global persist $Wings = 0
global persist $HairAccessories = 0
global persist $Bottom = 0
global persist $Facemask = 0
global persist $outfit = 0
global persist $ADress = 0
global persist $ASleeves = 0
global persist $ACollar = 0
global persist $AStockings = 0
global persist $AHeels = 0
global persist $AWings = 0
global persist $AHairAccessories = 0
global persist $ABottom = 0
global persist $AFacemask = 0
global persist $BDress = 0
global persist $BSleeves = 0
global persist $BCollar = 0
global persist $BStockings = 0
global persist $BHeels = 0
global persist $BWings = 0
global persist $BHairAccessories = 0
global persist $BBottom = 0
global persist $BFacemask = 0
global persist $CDress = 0
global persist $CSleeves = 0
global persist $CCollar = 0
global persist $CStockings = 0
global persist $CHeels = 0
global persist $CWings = 0
global persist $CHairAccessories = 0
global persist $CBottom = 0
global persist $CFacemask = 0
global persist $DDress = 0
global persist $DSleeves = 0
global persist $DCollar = 0
global persist $DStockings = 0
global persist $DHeels = 0
global persist $DWings = 0
global persist $DHairAccessories = 0
global persist $DBottom = 0
global persist $DFacemask = 0
; Exists for every export because Blend hooks are emitted before interaction
; helpers. It remains zero when interaction is disabled.
global $ll_interaction_active_remielleblacklegsnback = 0
; --- Interaction Modules (Detect / Jiggle) — globals only inside [Constants] ---
; NEVER open a [Key…] section here: it ends [Constants] and leaves later globals undeclared.
; Detector ownership is per exported mod.  Multiple interaction mods can be
; loaded together; one Present must never clear another mod's hit state.
global $Detected_remielleblacklegsnback = -1
global $ObjectDetectAllowed_remielleblacklegsnback = 0
global $isMouseButtonDown = 0
; Input state is recomputed in Present from hold flags, never latched by a
; key section. This prevents stuck grab state after focus changes.
global $ll_jiggle_lmb_down_remielleblacklegsnback = 0
global $ll_jiggle_rmb_down_remielleblacklegsnback = 0
global $ll_jiggle_x_down_remielleblacklegsnback = 0
global $ll_jiggle_modifier_down_remielleblacklegsnback = 0
global $ll_jiggle_lmb_prev_remielleblacklegsnback = 0
global $ll_jiggle_rmb_prev_remielleblacklegsnback = 0
global $ll_jiggle_combo_active_remielleblacklegsnback = 0
global $ll_jiggle_poke_sign_remielleblacklegsnback = 0
global $ll_jiggle_poke_hold_mult_remielleblacklegsnback = 1.0
global $ll_jiggle_modifier_ok_remielleblacklegsnback = 0
global $ll_jiggle_lmb_press_time_remielleblacklegsnback = 0
global $ll_jiggle_lmb_hold_fraction_remielleblacklegsnback = 0
global $inputMode = 0
; Mode belongs to the exported character, not the global 3DMigoto session.
; Otherwise enabling Anby can make Belle's Present draw its cursor.
; Armed by holding the Grab Modifier key below (see [KeyLLInputManagerModifier]) --
; that's what starts zone-detection computation and shows the hand, so an idle
; player costs nothing extra. NONE modifier = no key to hold, so always armed.
; Deliberately NOT persist: this is a live per-frame flag recomputed from the
; modifier key's hold state (like $ll_jiggle_modifier_down below), not a
; manual toggle that needs to survive between sessions. persist here meant a
; save mid-hold (or the legacy BtnJiggleMode click toggle) could leave the
; hand stuck visible on next launch until the first Alt press+release.
global $ll_jiggle_mode_remielleblacklegsnback = 0
; Previous frame's arm state, purely so [Present] can spot the 0 -> 1 edge and
; drop the hand's stale hover basis + hysteresis budget on re-arm. Initialised
; to 0 even for a NONE modifier: that just makes the very first frame fire one
; harmless clear of an already-empty buffer.
global $ll_jiggle_mode_prev_remielleblacklegsnback = 0
; Settle window. $ll_jiggle_mode gates the SOLVER and the deform dispatch, not
; just the hand, so releasing the modifier used to stop the simulation dead --
; fine when a release settled in a few frames, very visible once Return Spring
; made releases ring for a few hundred ms. These keep the physics running for a
; while after the modifier is let go; detection and the hand still stop
; immediately with it. `time` is in SECONDS -- see the note at the deadline in
; interaction.j2 before "correcting" that.
global $ll_jiggle_settle_until_remielleblacklegsnback = 0
global $ll_jiggle_settling_remielleblacklegsnback = 0
; Per-COMPONENT (not viewport_tag -- each component has its own separate
; jiggle dispatch/draw calls) guard against redundantly re-running the
; expensive jiggle deformation compute shader if the game reuses the same
; draw-call hash for multiple passes in one frame (shadow casters,
; reflections, etc.) -- see the dispatch guard in interaction.j2. -1 is a
; sentinel guaranteed to differ from any real `time` value, so the very
; first hit of a fresh frame always dispatches.
global $ll_jiggle_last_dispatch_remielleblacklegsnback = -1
global $ll_jiggle_last_dispatch_remielleblackwings = -1
global $ll_jiggle_last_dispatch_remielleblackhair = -1
global $ll_jiggle_last_dispatch_remielleblackbody = -1
global $ll_jiggle_last_dispatch_remielleblackmask = -1
; Same hazard, and it silently broke visible-only hit-testing for four versions.
; Visibility bits accumulate by ADDITION, so a bit added TWICE in one frame
; carries into its neighbour: a mesh on bit 22 drawn in two passes contributes
; 2 * 2^22 = 2^23, which reads as the NEXT mesh being visible and its own as
; hidden. Across a full character the word becomes a carry-sum in which most
; bits happen to read as set, so nearly every entry passed the gate and the
; feature looked like it did nothing at all.
;
; One flag per PART, because a part is one TextureOverride: a single shared flag
; would be consumed by whichever part drew first and every other part would
; never record itself. Set on that part's first fire each frame, cleared on the
; rest, and the accumulation lines are gated on it. The draws themselves still
; run on every pass -- only the bookkeeping is once.
global $ll_vis_frame_remielleblacklegsnbacka = -1
global $ll_vis_pass_remielleblacklegsnbacka = 0
global $ll_vis_frame_remielleblacklegsnbackb = -1
global $ll_vis_pass_remielleblacklegsnbackb = 0
global $ll_vis_frame_remielleblackwingsa = -1
global $ll_vis_pass_remielleblackwingsa = 0
global $ll_vis_frame_remielleblackhaira = -1
global $ll_vis_pass_remielleblackhaira = 0
global $ll_vis_frame_remielleblackhairb = -1
global $ll_vis_pass_remielleblackhairb = 0
global $ll_vis_frame_remielleblackbodya = -1
global $ll_vis_pass_remielleblackbodya = 0
global $ll_vis_frame_remielleblackbodyb = -1
global $ll_vis_pass_remielleblackbodyb = 0
global $ll_vis_frame_remielleblackmaska = -1
global $ll_vis_pass_remielleblackmaska = 0
; 0 = no cursor, 1 = production hand, 2 = hand + RGB diagnostic axes.
global $ll_jiggle_hand_debug_remielleblacklegsnback = 1
; Present-hand surface proxy: hides geometry embedded behind the detected
; local surface plane. This is intentionally independent from jiggle physics.
global $ll_jiggle_hand_surface_clip_remielleblacklegsnback = 1
global $ll_jiggle_hand_surface_lift_remielleblacklegsnback = 0.018
global $ll_jiggle_hand_surface_softness_remielleblacklegsnback = 0.020
; Hand Center/Scale in the Blender UI are normalized (0,0,0 / 1.0 = the
; tuned baseline look); the real baked-in offset/multiplier below is applied
; here only, invisibly, so a normalized default reproduces today's look.
global persist $ll_jiggle_hand_center_x_remielleblacklegsnback = -0.000614
global persist $ll_jiggle_hand_center_y_remielleblacklegsnback = 0.275962
global persist $ll_jiggle_hand_center_z_remielleblacklegsnback = 0.065117
global persist $ll_jiggle_hand_scale_remielleblacklegsnback = 0.500000
global persist $ll_jiggle_hand_opacity_remielleblacklegsnback = 1.000000
global persist $ll_jiggle_hand_tilt_min_remielleblacklegsnback = 10.000000
global persist $ll_jiggle_hand_windup_time_remielleblacklegsnback = 1.000000
global persist $ll_jiggle_hand_tilt_max_deg_remielleblacklegsnback = 45.000000
global persist $ll_jiggle_hand_tilt_rmb_min_remielleblacklegsnback = 10.000000
global persist $ll_jiggle_hand_rmb_windup_time_remielleblacklegsnback = 1.000000
global persist $ll_jiggle_hand_tilt_rmb_max_deg_remielleblacklegsnback = 45.000000
global persist $ll_jiggle_hand_tilt_grab_max_deg_remielleblacklegsnback = 45.000000
global persist $ll_jiggle_hand_vibrate_threshold_remielleblacklegsnback = 0.500000
global persist $ll_jiggle_hand_vibrate_period_slow_remielleblacklegsnback = 0.800000
global persist $ll_jiggle_hand_vibrate_period_fast_remielleblacklegsnback = 0.100000
global persist $ll_jiggle_hand_vibrate_amplitude_remielleblacklegsnback = 4.000000
global persist $ll_jiggle_hand_upright_max_deg_remielleblacklegsnback = 80.000000
global persist $ll_jiggle_hand_outline_width_remielleblacklegsnback = 2.000000
global persist $ll_jiggle_hand_outline_opacity_remielleblacklegsnback = 1.000000
global persist $ll_jiggle_hand_reference_height_remielleblacklegsnback = 2160.000000
global $ll_jiggle_poke_strength_remielleblacklegsnback = 1.000000
global $ll_jiggle_poke_min_strength_remielleblacklegsnback = 0.250000
global $ll_jiggle_poke_hold_frames_remielleblacklegsnback = 8.000000
global $ll_jiggle_grab_depth_pull_remielleblacklegsnback = 1.000000
global $ll_jiggle_release_damping_boost_remielleblacklegsnback = 1.050000
global $ll_jiggle_release_damping_decay_remielleblacklegsnback = 0.920000
; Charging state (see rzm_jiggle_screen_state.hlsl's POKE_PARAMS.w): a
; continuous per-frame sign (-1 LMB, +1 RMB, 0 neither), unlike poke_sign's
; one-frame pulse. Recomputed in Present, never latched by a key section.
; Swing axis constraint, held during a normal LMB+RMB grab:
;   0 = both axes (the cone, and the default)
;   1 = axis A only   (Shift)
;   2 = axis B only   (Ctrl)
; A cone is hard to steer as free 2D aim, and its second axis often points into
; the screen where a screen-plane drag cannot reach it. Constraining to one axis
; at a time makes both reachable. Deliberately a MODIFIER rather than a mouse
; button: the LMB+RMB chord is what keeps the game camera still during a drag,
; and re-using a button for axis choice broke that (see v0.5.5.1-.3).
; Per-mesh visibility accumulators for visible-only hit-testing. Each drawn mesh
; adds its own bit inside its draw condition (see _draw_body); Present publishes
; these to IniParams[144] and resets them. 24 bits per word keeps every value
; exactly representable as a float, which matters because this accumulates by
; addition.
global $ll_vis_0_remielleblacklegsnback = 0
global $ll_vis_1_remielleblacklegsnback = 0
global $ll_vis_2_remielleblacklegsnback = 0
global $ll_vis_3_remielleblacklegsnback = 0
global $ll_hit_test_visible_remielleblacklegsnback = 1
global $ll_jiggle_axis_select_remielleblacklegsnback = 0
global $ll_jiggle_axis1_down_remielleblacklegsnback = 0
global $ll_jiggle_axis2_down_remielleblacklegsnback = 0
global $ll_jiggle_charge_sign_remielleblacklegsnback = 0
global $ll_jiggle_rmb_lone_hold_remielleblacklegsnback = 0
global $ll_jiggle_rmb_hold_fraction_remielleblacklegsnback = 0
global $ll_jiggle_rmb_press_time_remielleblacklegsnback = 0
global $hoveredID = -1
global $CursorIsMoved = 0
global $cursorX = 0.5
global $cursorY = 0.5
global $screenW = 1
global $screenH = 1
; Shared viewport API. Identity is the only permitted fallback: consumers
; must never apply a partial offset/resize to invalid source dimensions.
global $ll_viewport_valid = 0
global $ll_viewport_offset_x = 0
global $ll_viewport_offset_y = 0
global $ll_viewport_scale_x = 1
global $ll_viewport_scale_y = 1
; Low-frequency, capture-only viewport probe. It never copies a game RT.
global $ll_viewport_probe_enabled = 1
; Snapshotting an RT is deliberately low-frequency.  The layout is normally
; static between UI transitions, so two updates per second are sufficient.
global $ll_viewport_probe_interval_remielleblacklegsnback = 0.50
global $ll_viewport_probe_next_time_remielleblacklegsnback = 0
global $ll_viewport_probe_armed_remielleblacklegsnback = 0
global $ll_viewport_probe_generation_remielleblacklegsnback = 0
global $ll_jiggle_mult_radius_remielleblacklegsnback = 1.0
; The screen-space API produces a physically meaningful drag vector, which is
; stronger than the legacy local-axis approximation.  Keep legacy exports
; usable by scaling the drive and restoring force globally.
global $ll_jiggle_mult_strength_remielleblacklegsnback = 0.333333
global $ll_jiggle_mult_spring_remielleblacklegsnback = 0.333333
global $ll_jiggle_mult_damping_remielleblacklegsnback = 1.0
; Physics is integrated in seconds, normalised to the legacy 60 Hz profile.
; Raise this to make the spring and release animation play faster without
; making the result depend on the display frame rate.
global $ll_jiggle_sim_speed_remielleblacklegsnback = 3.00
; Per-mod clock: sharing this pair makes the second loaded interaction mod
; observe a near-zero delta in the same Present.
global $ll_jiggle_delta_time_remielleblacklegsnback = 0.0166667
global $ll_jiggle_prev_time_remielleblacklegsnback = 0
; Safety cap for a hitch / alt-tab. This is a simulation step, in 60 Hz units.
global $ll_jiggle_max_step_remielleblacklegsnback = 3.0
; Per packed jiggle zone radius. 0.0 inherits the exported/default radius.
; Slot N = position N among UNMUTED zones in scene.llmenu.jiggle_zones
; (Interaction Modules panel) -- muted zones are skipped entirely and never
; consume a slot. This filtered list is rebuilt here (not imported) because
; leading-underscore macros/namespaces aren't importable across template
; files in this codebase (see _obj_mode_int in interaction.j2) -- the same
; filter is duplicated in interaction.j2's resize-slot lookup and in
; core/detect_export.py's get_active_jiggle_zones, and all three MUST agree.
global $ll_jiggle_radius_slot_0_remielleblacklegsnback = 0.400000
global $ll_jiggle_radius_slot_1_remielleblacklegsnback = 0.400000
global $ll_jiggle_radius_slot_2_remielleblacklegsnback = 0.000000
global $ll_jiggle_radius_slot_3_remielleblacklegsnback = 0.320000
global $ll_jiggle_radius_slot_4_remielleblacklegsnback = 0.320000
global $ll_jiggle_radius_slot_5_remielleblacklegsnback = 0.320000
global $ll_jiggle_radius_slot_6_remielleblacklegsnback = 0.320000
global $ll_jiggle_radius_slot_7_remielleblacklegsnback = 0.000000
global $ll_jiggle_radius_slot_8_remielleblacklegsnback = 0.000000
global $ll_jiggle_radius_slot_9_remielleblacklegsnback = 0.260000
global $ll_jiggle_radius_slot_10_remielleblacklegsnback = 0.260000
global $ll_jiggle_radius_slot_11_remielleblacklegsnback = 0.000000
; Per-zone target strength. 0.0 inherits the exported/default strength.
global $ll_jiggle_strength_slot_0_remielleblacklegsnback = 1.415000
global $ll_jiggle_strength_slot_1_remielleblacklegsnback = 1.415000
global $ll_jiggle_strength_slot_2_remielleblacklegsnback = 3.000000
global $ll_jiggle_strength_slot_3_remielleblacklegsnback = 2.075000
global $ll_jiggle_strength_slot_4_remielleblacklegsnback = 0.500000
global $ll_jiggle_strength_slot_5_remielleblacklegsnback = 2.075000
global $ll_jiggle_strength_slot_6_remielleblacklegsnback = 0.500000
global $ll_jiggle_strength_slot_7_remielleblacklegsnback = 1.000000
global $ll_jiggle_strength_slot_8_remielleblacklegsnback = 1.000000
global $ll_jiggle_strength_slot_9_remielleblacklegsnback = 1.650000
global $ll_jiggle_strength_slot_10_remielleblacklegsnback = 1.650000
global $ll_jiggle_strength_slot_11_remielleblacklegsnback = 4.000000
; Per-zone absolute displacement clamp. 0.0 inherits the legacy global cap.
; "_base" is the exported/authored value; the plain name below is the
; runtime value the jiggle CS dispatches actually read, recomputed fresh
; each Present (see CommandListLLJiggleSizeScale) so a mapped resize slider
; can scale it live without permanently overwriting the authored base.
global $ll_jiggle_max_offset_slot_0_base_remielleblacklegsnback = 0.080000
global $ll_jiggle_max_offset_slot_1_base_remielleblacklegsnback = 0.080000
global $ll_jiggle_max_offset_slot_2_base_remielleblacklegsnback = 0.010000
global $ll_jiggle_max_offset_slot_3_base_remielleblacklegsnback = 0.015000
global $ll_jiggle_max_offset_slot_4_base_remielleblacklegsnback = 0.015000
global $ll_jiggle_max_offset_slot_5_base_remielleblacklegsnback = 0.015000
global $ll_jiggle_max_offset_slot_6_base_remielleblacklegsnback = 0.015000
global $ll_jiggle_max_offset_slot_7_base_remielleblacklegsnback = 0.055000
global $ll_jiggle_max_offset_slot_8_base_remielleblacklegsnback = 0.055000
global $ll_jiggle_max_offset_slot_9_base_remielleblacklegsnback = 0.060000
global $ll_jiggle_max_offset_slot_10_base_remielleblacklegsnback = 0.060000
global $ll_jiggle_max_offset_slot_11_base_remielleblacklegsnback = 0.747000
global $ll_jiggle_max_offset_slot_0_remielleblacklegsnback = 0
global $ll_jiggle_max_offset_slot_1_remielleblacklegsnback = 0
global $ll_jiggle_max_offset_slot_2_remielleblacklegsnback = 0
global $ll_jiggle_max_offset_slot_3_remielleblacklegsnback = 0
global $ll_jiggle_max_offset_slot_4_remielleblacklegsnback = 0
global $ll_jiggle_max_offset_slot_5_remielleblacklegsnback = 0
global $ll_jiggle_max_offset_slot_6_remielleblacklegsnback = 0
global $ll_jiggle_max_offset_slot_7_remielleblacklegsnback = 0
global $ll_jiggle_max_offset_slot_8_remielleblacklegsnback = 0
global $ll_jiggle_max_offset_slot_9_remielleblacklegsnback = 0
global $ll_jiggle_max_offset_slot_10_remielleblacklegsnback = 0
global $ll_jiggle_max_offset_slot_11_remielleblacklegsnback = 0
; Non-grabbable zones (e.g. a head-pat spot) deny the LMB+RMB grab/drag combo
; entirely -- poke (a lone LMB/RMB tap-release) still always works regardless
; of this flag. 1 = grabbable (default), 0 = poke/pull only.
global $ll_jiggle_grabbable_slot_0_remielleblacklegsnback = 1
global $ll_jiggle_grabbable_slot_1_remielleblacklegsnback = 1
global $ll_jiggle_grabbable_slot_2_remielleblacklegsnback = 1
global $ll_jiggle_grabbable_slot_3_remielleblacklegsnback = 1
global $ll_jiggle_grabbable_slot_4_remielleblacklegsnback = 1
global $ll_jiggle_grabbable_slot_5_remielleblacklegsnback = 1
global $ll_jiggle_grabbable_slot_6_remielleblacklegsnback = 1
global $ll_jiggle_grabbable_slot_7_remielleblacklegsnback = 1
global $ll_jiggle_grabbable_slot_8_remielleblacklegsnback = 1
global $ll_jiggle_grabbable_slot_9_remielleblacklegsnback = 1
global $ll_jiggle_grabbable_slot_10_remielleblacklegsnback = 1
global $ll_jiggle_grabbable_slot_11_remielleblacklegsnback = 1
; Per-zone falloff shape exponent. 0.0 inherits the shader's default (1.5).
; Higher = sharper/more concentrated peak, lower = flatter/more even spread
; within the zone's Radius.
global $ll_jiggle_falloff_slot_0_remielleblacklegsnback = 3.500000
global $ll_jiggle_falloff_slot_1_remielleblacklegsnback = 3.500000
global $ll_jiggle_falloff_slot_2_remielleblacklegsnback = 1.283000
global $ll_jiggle_falloff_slot_3_remielleblacklegsnback = 0.000000
global $ll_jiggle_falloff_slot_4_remielleblacklegsnback = 0.000000
global $ll_jiggle_falloff_slot_5_remielleblacklegsnback = 0.000000
global $ll_jiggle_falloff_slot_6_remielleblacklegsnback = 0.000000
global $ll_jiggle_falloff_slot_7_remielleblacklegsnback = 0.000000
global $ll_jiggle_falloff_slot_8_remielleblacklegsnback = 0.000000
global $ll_jiggle_falloff_slot_9_remielleblacklegsnback = 2.000000
global $ll_jiggle_falloff_slot_10_remielleblacklegsnback = 2.000000
global $ll_jiggle_falloff_slot_11_remielleblacklegsnback = 0.000000
; Path Slide: 1.0 = this zone is a rigid path-slide (see PathVectors.buf),
; 0.0 = normal Jiggle. Authored, not runtime -- fixed for the whole export.
; Progress (0..1 along the path) is NOT an ini variable -- it's tracked
; GPU-side in ResourceLLPathProgressState (see rzm_jiggle_screen_state.hlsl),
; a plain persistent buffer that survives frame-to-frame on its own without
; needing ini `persist` (which saves to disk across game sessions -- not
; wanted here, same reasoning as $ll_jiggle_mode's persist removal earlier).
global $ll_jiggle_path_mode_slot_0_remielleblacklegsnback = 0
global $ll_jiggle_path_mode_slot_1_remielleblacklegsnback = 0
global $ll_jiggle_path_mode_slot_2_remielleblacklegsnback = 0
global $ll_jiggle_path_mode_slot_3_remielleblacklegsnback = 0
global $ll_jiggle_path_mode_slot_4_remielleblacklegsnback = 0
global $ll_jiggle_path_mode_slot_5_remielleblacklegsnback = 0
global $ll_jiggle_path_mode_slot_6_remielleblacklegsnback = 0
global $ll_jiggle_path_mode_slot_7_remielleblacklegsnback = 0
global $ll_jiggle_path_mode_slot_8_remielleblacklegsnback = 0
global $ll_jiggle_path_mode_slot_9_remielleblacklegsnback = 0
global $ll_jiggle_path_mode_slot_10_remielleblacklegsnback = 0
global $ll_jiggle_path_mode_slot_11_remielleblacklegsnback = 0
; Per-zone damping multiplier override -- scales both grab AND release
; physics (same scope as the global $ll_jiggle_mult_damping it overrides).
; Higher = stiffer/less wobbly, lower = looser/more persistent motion.
; 0 = inherit the global multiplier.
global $ll_jiggle_damping_slot_0_remielleblacklegsnback = 0.900000
global $ll_jiggle_damping_slot_1_remielleblacklegsnback = 0.900000
global $ll_jiggle_damping_slot_2_remielleblacklegsnback = 0.900000
global $ll_jiggle_damping_slot_3_remielleblacklegsnback = 0.900000
global $ll_jiggle_damping_slot_4_remielleblacklegsnback = 0.900000
global $ll_jiggle_damping_slot_5_remielleblacklegsnback = 0.900000
global $ll_jiggle_damping_slot_6_remielleblacklegsnback = 0.900000
global $ll_jiggle_damping_slot_7_remielleblacklegsnback = 0.900000
global $ll_jiggle_damping_slot_8_remielleblacklegsnback = 0.900000
global $ll_jiggle_damping_slot_9_remielleblacklegsnback = 0.900000
global $ll_jiggle_damping_slot_10_remielleblacklegsnback = 0.900000
global $ll_jiggle_damping_slot_11_remielleblacklegsnback = 1.010000
; Per-zone RETURN spring: how hard the zone is pulled back to rest after
; release, i.e. the SPEED of the return. Damping is the other half of the feel
; (how much it overshoots on the way). Independent of strength, which only acts
; while the button is held. 0 = inherit the global release spring.
;
; The panel authors this as a MULTIPLE of the stock spring (1.0 = default) and
; it is scaled back down to the real value here -- the raw 0.055 reads like it
; belongs on Damping's 0..1 scale and it does not. The 0.055 below must match
; w70 in interaction.j2 and RETURN_SPRING_UNIT in data/properties.py.
global $ll_jiggle_return_spring_slot_0_remielleblacklegsnback = 0.000000
global $ll_jiggle_return_spring_slot_1_remielleblacklegsnback = 0.000000
global $ll_jiggle_return_spring_slot_2_remielleblacklegsnback = 0.000000
global $ll_jiggle_return_spring_slot_3_remielleblacklegsnback = 0.000000
global $ll_jiggle_return_spring_slot_4_remielleblacklegsnback = 0.000000
global $ll_jiggle_return_spring_slot_5_remielleblacklegsnback = 0.000000
global $ll_jiggle_return_spring_slot_6_remielleblacklegsnback = 0.000000
global $ll_jiggle_return_spring_slot_7_remielleblacklegsnback = 0.000000
global $ll_jiggle_return_spring_slot_8_remielleblacklegsnback = 0.000000
global $ll_jiggle_return_spring_slot_9_remielleblacklegsnback = 0.000000
global $ll_jiggle_return_spring_slot_10_remielleblacklegsnback = 0.000000
global $ll_jiggle_return_spring_slot_11_remielleblacklegsnback = 0.006600
; Swing: 1.0 = this zone rotates around an authored pivot (SwingPivots.buf /
; SwingAxisX.buf / SwingAxisY.buf) instead of translating, 0.0 = normal
; Jiggle/Path Slide. Springs back to rest like Jiggle -- gated by activeZone,
; not independent of it the way Path Slide's persistent hold is.
global $ll_jiggle_swing_mode_slot_0_remielleblacklegsnback = 0
global $ll_jiggle_swing_mode_slot_1_remielleblacklegsnback = 0
global $ll_jiggle_swing_mode_slot_2_remielleblacklegsnback = 0
global $ll_jiggle_swing_mode_slot_3_remielleblacklegsnback = 0
global $ll_jiggle_swing_mode_slot_4_remielleblacklegsnback = 0
global $ll_jiggle_swing_mode_slot_5_remielleblacklegsnback = 0
global $ll_jiggle_swing_mode_slot_6_remielleblacklegsnback = 0
global $ll_jiggle_swing_mode_slot_7_remielleblacklegsnback = 0
global $ll_jiggle_swing_mode_slot_8_remielleblacklegsnback = 0
global $ll_jiggle_swing_mode_slot_9_remielleblacklegsnback = 0
global $ll_jiggle_swing_mode_slot_10_remielleblacklegsnback = 0
global $ll_jiggle_swing_mode_slot_11_remielleblacklegsnback = 1
; Swing sign convention, per game. Genshin's meshes are handed the opposite way
; round to ZZZ's, so a positive limit swung the hem INTO the body instead of out.
; This is fixed HERE, on the authored numbers, rather than in the exported axis
; frame -- the axis signs cannot express it. Flipping a pair of axis signs is
; pure gauge: it is forced to keep det=+1, and the two flips cancel so the
; exported axisX/axisY come out byte-identical. Verified. Negating the limits is
; the only lever that actually changes which way a given limit sends the tip.
; The author types the same numbers on every game; the sign is applied on export.
; Swing travel limits (degrees), signed and asymmetric, per swing axis.
; A/B = the first/second letter of the zone's Swing Axis; B is unused by the
; single-letter hinge modes. Reached softly, not clamped hard -- the drag eases
; toward its own ceiling, so a limit reads as running out of give. Asymmetry is
; the point: a hem can swing freely forward while stopping short of the legs.
global $ll_jiggle_swing_min_a_slot_0_remielleblacklegsnback = -45.000000
global $ll_jiggle_swing_min_a_slot_1_remielleblacklegsnback = -45.000000
global $ll_jiggle_swing_min_a_slot_2_remielleblacklegsnback = -45.000000
global $ll_jiggle_swing_min_a_slot_3_remielleblacklegsnback = -45.000000
global $ll_jiggle_swing_min_a_slot_4_remielleblacklegsnback = -45.000000
global $ll_jiggle_swing_min_a_slot_5_remielleblacklegsnback = -45.000000
global $ll_jiggle_swing_min_a_slot_6_remielleblacklegsnback = -45.000000
global $ll_jiggle_swing_min_a_slot_7_remielleblacklegsnback = -45.000000
global $ll_jiggle_swing_min_a_slot_8_remielleblacklegsnback = -45.000000
global $ll_jiggle_swing_min_a_slot_9_remielleblacklegsnback = -45.000000
global $ll_jiggle_swing_min_a_slot_10_remielleblacklegsnback = -45.000000
global $ll_jiggle_swing_min_a_slot_11_remielleblacklegsnback = -45.000000
global $ll_jiggle_swing_max_a_slot_0_remielleblacklegsnback = 45.000000
global $ll_jiggle_swing_max_a_slot_1_remielleblacklegsnback = 45.000000
global $ll_jiggle_swing_max_a_slot_2_remielleblacklegsnback = 45.000000
global $ll_jiggle_swing_max_a_slot_3_remielleblacklegsnback = 45.000000
global $ll_jiggle_swing_max_a_slot_4_remielleblacklegsnback = 45.000000
global $ll_jiggle_swing_max_a_slot_5_remielleblacklegsnback = 45.000000
global $ll_jiggle_swing_max_a_slot_6_remielleblacklegsnback = 45.000000
global $ll_jiggle_swing_max_a_slot_7_remielleblacklegsnback = 45.000000
global $ll_jiggle_swing_max_a_slot_8_remielleblacklegsnback = 45.000000
global $ll_jiggle_swing_max_a_slot_9_remielleblacklegsnback = 45.000000
global $ll_jiggle_swing_max_a_slot_10_remielleblacklegsnback = 45.000000
global $ll_jiggle_swing_max_a_slot_11_remielleblacklegsnback = 45.000000
global $ll_jiggle_swing_min_b_slot_0_remielleblacklegsnback = -45.000000
global $ll_jiggle_swing_min_b_slot_1_remielleblacklegsnback = -45.000000
global $ll_jiggle_swing_min_b_slot_2_remielleblacklegsnback = -45.000000
global $ll_jiggle_swing_min_b_slot_3_remielleblacklegsnback = -45.000000
global $ll_jiggle_swing_min_b_slot_4_remielleblacklegsnback = -45.000000
global $ll_jiggle_swing_min_b_slot_5_remielleblacklegsnback = -45.000000
global $ll_jiggle_swing_min_b_slot_6_remielleblacklegsnback = -45.000000
global $ll_jiggle_swing_min_b_slot_7_remielleblacklegsnback = -45.000000
global $ll_jiggle_swing_min_b_slot_8_remielleblacklegsnback = -45.000000
global $ll_jiggle_swing_min_b_slot_9_remielleblacklegsnback = -45.000000
global $ll_jiggle_swing_min_b_slot_10_remielleblacklegsnback = -45.000000
global $ll_jiggle_swing_min_b_slot_11_remielleblacklegsnback = -120.000000
global $ll_jiggle_swing_max_b_slot_0_remielleblacklegsnback = 45.000000
global $ll_jiggle_swing_max_b_slot_1_remielleblacklegsnback = 45.000000
global $ll_jiggle_swing_max_b_slot_2_remielleblacklegsnback = 45.000000
global $ll_jiggle_swing_max_b_slot_3_remielleblacklegsnback = 45.000000
global $ll_jiggle_swing_max_b_slot_4_remielleblacklegsnback = 45.000000
global $ll_jiggle_swing_max_b_slot_5_remielleblacklegsnback = 45.000000
global $ll_jiggle_swing_max_b_slot_6_remielleblacklegsnback = 45.000000
global $ll_jiggle_swing_max_b_slot_7_remielleblacklegsnback = 45.000000
global $ll_jiggle_swing_max_b_slot_8_remielleblacklegsnback = 45.000000
global $ll_jiggle_swing_max_b_slot_9_remielleblacklegsnback = 45.000000
global $ll_jiggle_swing_max_b_slot_10_remielleblacklegsnback = 45.000000
global $ll_jiggle_swing_max_b_slot_11_remielleblacklegsnback = 10.000000
; Swing axis mode: 0 = 1-axis hinge (drag is collapsed onto AxisX first, so the
; part swings in one fixed plane), 1 = 2-axis cone (the drag's full
; perpendicular-to-rest component aims freely). Both feed the SAME single
; combined rotation -- 1-axis is a constrained input, not a separate path.
; Derived from LLMenuJiggleZone.swing_axis: one letter (X/Y/Z) = hinge, two
; letters (XY/YZ/XZ) = cone. AxisX/AxisY themselves are baked per zone by
; core/swing_export.py from mesh vertices, not from any object transform.
global $ll_jiggle_swing_axis_mode_slot_0_remielleblacklegsnback = 0
global $ll_jiggle_swing_axis_mode_slot_1_remielleblacklegsnback = 0
global $ll_jiggle_swing_axis_mode_slot_2_remielleblacklegsnback = 0
global $ll_jiggle_swing_axis_mode_slot_3_remielleblacklegsnback = 0
global $ll_jiggle_swing_axis_mode_slot_4_remielleblacklegsnback = 0
global $ll_jiggle_swing_axis_mode_slot_5_remielleblacklegsnback = 0
global $ll_jiggle_swing_axis_mode_slot_6_remielleblacklegsnback = 0
global $ll_jiggle_swing_axis_mode_slot_7_remielleblacklegsnback = 0
global $ll_jiggle_swing_axis_mode_slot_8_remielleblacklegsnback = 0
global $ll_jiggle_swing_axis_mode_slot_9_remielleblacklegsnback = 0
global $ll_jiggle_swing_axis_mode_slot_10_remielleblacklegsnback = 0
global $ll_jiggle_swing_axis_mode_slot_11_remielleblacklegsnback = 1
global $ll_jiggle_size_scale_min_remielleblacklegsnback = 0.500000
global $ll_jiggle_size_scale_max_remielleblacklegsnback = 1.500000
; Per-component anchor reach in pixels.  A component uses its own nearest
; local surface within this radius, never another component's local VB0 hit.
global $ll_jiggle_component_anchor_px_remielleblacklegsnback = 48.0
; Writes only tiny diagnostic buffers; dump commands themselves are inert
; unless 3DMigoto hunting mode is active.
global $ll_jiggle_debug_dump = 1
; Opt-in per-vertex seam trace. It is intentionally off outside diagnosis.
global $ll_jiggle_vertex_debug_dump = 0
global persist $sk_panel_open = 0
global $temp_left = 0
global $temp_w = 0
global $temp_val = 0
global $prev_time = 0
global $dt = 0
global $active_slider = -1
global $prev_click_sk = 0
; EGS-safe deferred resize init (non-persist). See helpers/resize_shapes.j2
; $init_frame counts load frames; $ll_resize_ready gates CS resource copies.
global $init_frame = 0
global $ll_resize_ready = 0
global persist $Resize_0 = 0.0
global persist $Resize_0_Past = 0.0
global persist $ResizeVisual_0 = 0.0
global persist $Resize_1 = 0.0
global persist $Resize_1_Past = 0.0
global persist $ResizeVisual_1 = 0.0
global persist $Resize_2 = 0.0
global persist $Resize_2_Past = 0.0
global persist $ResizeVisual_2 = 0.0
global persist $Resize_3 = 0.0
global persist $Resize_3_Past = 0.0
global persist $ResizeVisual_3 = 0.0
global persist $Resize_4 = 0.0
global persist $Resize_4_Past = 0.0
global persist $ResizeVisual_4 = 0.0
global persist $Resize_5 = 0.0
global persist $Resize_5_Past = 0.0
global persist $ResizeVisual_5 = 0.0

; Individual holds are intentionally independent. Present combines them into
; one grab chord and one-frame poke releases without swallowing game input.

[KeyLLInputManagerLMB_remielleblacklegsnback]
key = VK_LBUTTON
type = hold
$ll_jiggle_lmb_down_remielleblacklegsnback = 1
post $ll_jiggle_lmb_down_remielleblacklegsnback = 0

[KeyLLInputManagerRMB_remielleblacklegsnback]
key = VK_RBUTTON
type = hold
$ll_jiggle_rmb_down_remielleblacklegsnback = 1
post $ll_jiggle_rmb_down_remielleblacklegsnback = 0

; Hold Shift during a grab to constrain a 2-axis Swing zone to its first axis.
; Skipped entirely if Shift is already the grab modifier, which would make the
; constraint permanently on.

[KeyLLInputManagerSwingAxis1_remielleblacklegsnback]
key = VK_SHIFT
type = hold
$ll_jiggle_axis1_down_remielleblacklegsnback = 1
post $ll_jiggle_axis1_down_remielleblacklegsnback = 0
; Hold Ctrl for the second axis. Same skip rule.

[KeyLLInputManagerSwingAxis2_remielleblacklegsnback]
key = VK_CONTROL
type = hold
$ll_jiggle_axis2_down_remielleblacklegsnback = 1
post $ll_jiggle_axis2_down_remielleblacklegsnback = 0

[KeyLLInputManagerX_remielleblacklegsnback]
key = X
type = hold
$ll_jiggle_x_down_remielleblacklegsnback = 1
post $ll_jiggle_x_down_remielleblacklegsnback = 0

[KeyLLInputManagerModifier_remielleblacklegsnback]
key = VK_MENU
type = hold
$ll_jiggle_modifier_down_remielleblacklegsnback = 1
; Holding the grab modifier is what arms jiggle mode -- starts zone-detection
; computation and shows the hand. Released -> back off, so nothing runs while
; the player isn't actively interacting.
$ll_jiggle_mode_remielleblacklegsnback = 1
post $ll_jiggle_modifier_down_remielleblacklegsnback = 0
post $ll_jiggle_mode_remielleblacklegsnback = 0

[KeyDress]
condition = $active == 1
key = no_modifiers Y
type = cycle
$Dress = 0, 1, 2, 3, 4, 5, -1

[KeySleeves]
condition = $active == 1
key = alt Y
type = cycle
$Sleeves = 0, 1, 2, 3, -1

[KeyCollar]
condition = $active == 1
key = no_modifiers 6
type = cycle
$Collar = 0, 1, -1

[KeyStockings]
condition = $active == 1
key = no_modifiers n
type = cycle
$Stockings = 0, -1

[KeyHeels]
condition = $active == 1
key = alt n
type = cycle
$Heels = 0, -1

[KeyWings]
condition = $active == 1
key = no_modifiers 7
type = cycle
$Wings = 0, -1

[KeyHairAccessories]
condition = $active == 1
key = ctrl 6
type = cycle
$HairAccessories = 0, 1, 2, -1

[KeyBottom]
condition = $active == 1
key = no_modifiers h
type = cycle
$Bottom = 0, 1, 2, -1

[KeyFacemask]
condition = $active == 1
key = alt 6
type = cycle
$Facemask = 0, -1

; === Outfit prev/next — KeyPress + GUI share the same CommandLists ===

[KeyOutfit-]
condition = $active == 1
key = alt ,
key = alt VK_LEFT
run = CommandListCycleOutfitPrev

[KeyOutfit+]
condition = $active == 1
key = alt .
key = alt VK_RIGHT
run = CommandListCycleOutfitNext

[KeySaveA]
condition = $active == 1
key = shift VK_UP
run = CommandListSaveA

[KeyLoadA]
condition = $active == 1
key = ctrl VK_UP
run = CommandListLoadA

[KeySaveB]
condition = $active == 1
key = shift VK_DOWN
run = CommandListSaveB

[KeyLoadB]
condition = $active == 1
key = ctrl VK_DOWN
run = CommandListLoadB

[KeySaveC]
condition = $active == 1
key = shift VK_LEFT
run = CommandListSaveC

[KeyLoadC]
condition = $active == 1
key = ctrl VK_LEFT
run = CommandListLoadC

[KeySaveD]
condition = $active == 1
key = shift VK_RIGHT
run = CommandListSaveD

[KeyLoadD]
condition = $active == 1
key = ctrl VK_RIGHT
run = CommandListLoadD

[KeyRandomizeAll]
condition = $active == 1
key = VK_DELETE
run = CommandListRandomAll

[KeyResetAll]
condition = $active == 1
key = VK_BACK
run = CommandListResetAll



; Overrides -------------------------

[TextureOverrideRemielleBlackLegsnBackBlend]
hash = ff05e5f9
handling = skip
vb2 = ResourceRemielleBlackLegsnBackBlend
if DRAW_TYPE == 1
	vb0 = ResourceRemielleBlackLegsnBackPosition
	draw = 57204, 0
	$active = 1
	$activeForMenu = 1
	$ll_interaction_active_remielleblacklegsnback = 1
endif

[TextureOverrideRemielleBlackLegsnBackTexcoord]
hash = 7c0db158
vb1 = ResourceRemielleBlackLegsnBackTexcoord

[TextureOverrideRemielleBlackLegsnBackVertexLimitRaise]
hash = 96dc0a8e
override_vertex_count = 57204
override_byte_stride = 40

[TextureOverrideRemielleBlackWingsBlend]
hash = 7b12084f
handling = skip
vb2 = ResourceRemielleBlackWingsBlend
if DRAW_TYPE == 1
	vb0 = ResourceRemielleBlackWingsPosition
	draw = 5404, 0
	$active = 1
	$activeForMenu = 1
	$ll_interaction_active_remielleblacklegsnback = 1
endif

[TextureOverrideRemielleBlackWingsTexcoord]
hash = 9d9b4d62
vb1 = ResourceRemielleBlackWingsTexcoord

[TextureOverrideRemielleBlackWingsVertexLimitRaise]
hash = 7bc98032
override_vertex_count = 5404
override_byte_stride = 40

[TextureOverrideRemielleBlackHairBlend]
hash = 46eee329
handling = skip
vb2 = ResourceRemielleBlackHairBlend
if DRAW_TYPE == 1
	vb0 = ResourceRemielleBlackHairPosition
	draw = 7310, 0
	$active = 1
	$activeForMenu = 1
	$ll_interaction_active_remielleblacklegsnback = 1
endif

[TextureOverrideRemielleBlackHairTexcoord]
hash = fa8ab367
vb1 = ResourceRemielleBlackHairTexcoord

[TextureOverrideRemielleBlackHairVertexLimitRaise]
hash = fbe70114
override_vertex_count = 7310
override_byte_stride = 40

[TextureOverrideRemielleBlackBodyBlend]
hash = 7f6fe876
handling = skip
vb2 = ResourceRemielleBlackBodyBlend
if DRAW_TYPE == 1
	vb0 = ResourceRemielleBlackBodyPosition
	draw = 69443, 0
	$active = 1
	$activeForMenu = 1
	$ll_interaction_active_remielleblacklegsnback = 1
endif

[TextureOverrideRemielleBlackBodyTexcoord]
hash = 5dcc6ee1
vb1 = ResourceRemielleBlackBodyTexcoord

[TextureOverrideRemielleBlackBodyVertexLimitRaise]
hash = 22ec622c
override_vertex_count = 69443
override_byte_stride = 40

[TextureOverrideRemielleBlackMaskBlend]
hash = 901ac51a
handling = skip
vb2 = ResourceRemielleBlackMaskBlend
if DRAW_TYPE == 1
	vb0 = ResourceRemielleBlackMaskPosition
	draw = 320, 0
	$active = 1
	$activeForMenu = 1
	$ll_interaction_active_remielleblacklegsnback = 1
endif

[TextureOverrideRemielleBlackMaskTexcoord]
hash = 6b85337d
vb1 = ResourceRemielleBlackMaskTexcoord

[TextureOverrideRemielleBlackMaskVertexLimitRaise]
hash = cf5dc301
override_vertex_count = 320
override_byte_stride = 40

[TextureOverrideRemielleBlackLegsnBackIB]
hash = 09a51ed3
handling = skip

[TextureOverrideRemielleBlackLegsnBackA]
hash = 09a51ed3
match_first_index = 0
ib = ResourceRemielleBlackLegsnBackAIB
Resource\ZZMI\Diffuse = ref ResourceRemielleBlackLegsnBackADiffuse
Resource\ZZMI\NormalMap = ref ResourceRemielleBlackLegsnBackANormalMap
Resource\ZZMI\LightMap = ref ResourceRemielleBlackLegsnBackALightMap
Resource\ZZMI\MaterialMap = ref ResourceRemielleBlackLegsnBackAMaterialMap
run = CommandList\ZZMI\SetTextures
; HLSL must sample the character source, so this is the one
; controlled snapshot in the viewport path.  It happens once per
; probe generation (not once per part/draw/frame) and supplies an
; SRV-compatible texture just like TTL's PortraitRT.
if $ll_viewport_probe_armed_remielleblacklegsnback == 1 && ResourceLLViewportSource === null
	ResourceLLViewportSource = copy o0 unless_null
endif
if $ObjectDetectAllowed_remielleblacklegsnback == 1
	run = CustomShaderLLBakeRemielleBlackLegsnBackA
	run = CustomShaderLLDetectRemielleBlackLegsnBack
	if $ll_jiggle_debug_dump == 1
		dump = ResourceLLDebugDetect_RemielleBlackLegsnBack
	endif
endif
; Live preview is disabled pending safe BakeRT synchronisation.
; The settle window keeps deforming after the modifier is released
; so the release oscillation is actually drawn -- solving it without
; applying it would leave the zone visibly frozen while the maths
; ran on regardless.
if $ll_jiggle_mode_remielleblacklegsnback == 1 || $ll_jiggle_settling_remielleblacklegsnback == 1
	; Only actually dispatch once per frame -- this hook can fire
	; multiple times per frame if the game reuses this draw call's
	; hash for other passes (shadows, reflections). Every pass still
	; needs the deformed result, so vb0 is rebound unconditionally
	; below; only the expensive recompute is skipped on repeats.
	if time != $ll_jiggle_last_dispatch_remielleblacklegsnback
		run = CustomShaderLLJiggleRemielleBlackLegsnBack
		$ll_jiggle_last_dispatch_remielleblacklegsnback = time
		if $ll_jiggle_debug_dump == 1
			dump = ResourceLLDebugJiggle_RemielleBlackLegsnBack
		endif
		if $ll_jiggle_vertex_debug_dump == 1
			dump = ResourceLLDebugJiggleVertex_RemielleBlackLegsnBack
		endif
	endif
	vb0 = ResourceLLJiggleTempVB0_RemielleBlackLegsnBack
endif

; First fire of this part this frame? The hook repeats for
; shadow/reflection passes, and the visibility bits below add
; rather than OR, so a repeated add carries into the next mesh's
; bit. Draws still run every pass; only the bookkeeping is once.
$ll_vis_pass_remielleblacklegsnbacka = 0
if time != $ll_vis_frame_remielleblacklegsnbacka
	$ll_vis_frame_remielleblacklegsnbacka = time
	$ll_vis_pass_remielleblacklegsnbacka = 1
endif
; RemielleBlackLegsnBackA
; RemyBlack Heels (1300)
if $Heels == 0
	if $ll_vis_pass_remielleblacklegsnbacka == 1
		$ll_vis_0_remielleblacklegsnback = $ll_vis_0_remielleblacklegsnback + 1
	endif
	drawindexed = 4344, 0, 0

endif

; RemyBlack OG Bloomers (2358)
if $Bottom == 0 && ($Dress == 0 || $Dress == 1 || $Dress == 2 || $Dress == 3 || $Dress == 4 || $Dress == 5)
	if $ll_vis_pass_remielleblacklegsnbacka == 1
		$ll_vis_0_remielleblacklegsnback = $ll_vis_0_remielleblacklegsnback + 2
	endif
	drawindexed = 11604, 4344, 0

endif

; RemyBlack OG Bloomers.NoSkirt (1990)
if $Bottom == 0 && $Dress == -1
	if $ll_vis_pass_remielleblacklegsnbacka == 1
		$ll_vis_0_remielleblacklegsnback = $ll_vis_0_remielleblacklegsnback + 4
	endif
	drawindexed = 10020, 15948, 0

endif

; RemyBlack OG G-String (510)
if $Bottom == 2
	if $ll_vis_pass_remielleblacklegsnbacka == 1
		$ll_vis_0_remielleblacklegsnback = $ll_vis_0_remielleblacklegsnback + 8
	endif
	drawindexed = 2040, 25968, 0

endif

; RemyBlack OG Garters (128)
if $Stockings == 0 && $Bottom == 0
	if $ll_vis_pass_remielleblacklegsnbacka == 1
		$ll_vis_0_remielleblacklegsnback = $ll_vis_0_remielleblacklegsnback + 16
	endif
	drawindexed = 360, 28008, 0

endif

; RemyBlack OG Panties (1282)
if $Bottom == 1
	if $ll_vis_pass_remielleblacklegsnbacka == 1
		$ll_vis_0_remielleblacklegsnback = $ll_vis_0_remielleblacklegsnback + 32
	endif
	drawindexed = 6336, 28368, 0

endif

; RemyBlack Stockings (2468)
if $Stockings == 0
	if $ll_vis_pass_remielleblacklegsnbacka == 1
		$ll_vis_0_remielleblacklegsnback = $ll_vis_0_remielleblacklegsnback + 64
	endif
	drawindexed = 11364, 34704, 0

endif

; RemyBlack Stockings.Stars (224)
if $Stockings == 0
	if $ll_vis_pass_remielleblacklegsnbacka == 1
		$ll_vis_0_remielleblacklegsnback = $ll_vis_0_remielleblacklegsnback + 128
	endif
	drawindexed = 228, 46068, 0

endif

; LegsnBackA Skin
run = CommandListTextureSetremiellebody
; RemyBlack Body.Feet (3598)
if $Stockings == -1
	if $ll_vis_pass_remielleblacklegsnbacka == 1
		$ll_vis_0_remielleblacklegsnback = $ll_vis_0_remielleblacklegsnback + 256
	endif
	drawindexed = 17352, 46296, 0

endif

; RemyBlack Body.Legs (2458)
if $Stockings == -1
	if $ll_vis_pass_remielleblacklegsnbacka == 1
		$ll_vis_0_remielleblacklegsnback = $ll_vis_0_remielleblacklegsnback + 512
	endif
	drawindexed = 13812, 63648, 0

endif

; RemyBlack Body.Pelvis (10145)
if $Stockings == -1 && $Bottom == -1
	if $ll_vis_pass_remielleblacklegsnbacka == 1
		$ll_vis_0_remielleblacklegsnback = $ll_vis_0_remielleblacklegsnback + 1024
	endif
	drawindexed = 54132, 77460, 0

endif

; RemyBlack Body.Pelvis.Covered (10145)
if $Stockings == -1 && ($Bottom == 0 || $Bottom == 1 || $Bottom == 2)
	if $ll_vis_pass_remielleblacklegsnbacka == 1
		$ll_vis_0_remielleblacklegsnback = $ll_vis_0_remielleblacklegsnback + 2048
	endif
	drawindexed = 54132, 131592, 0

endif

; RemyBlack Body.Pelvis.Covered.OGStockings (10145)
if $Stockings == 0 && ($Bottom == 0 || $Bottom == 1 || $Bottom == 2)
	if $ll_vis_pass_remielleblacklegsnbacka == 1
		$ll_vis_0_remielleblacklegsnback = $ll_vis_0_remielleblacklegsnback + 4096
	endif
	drawindexed = 54132, 185724, 0

endif

; RemyBlack Body.Pelvis.OGStockings (10145)
if $Stockings == 0 && $Bottom == -1
	if $ll_vis_pass_remielleblacklegsnbacka == 1
		$ll_vis_0_remielleblacklegsnback = $ll_vis_0_remielleblacklegsnback + 8192
	endif
	drawindexed = 54132, 239856, 0

endif

; RemielleBlackBodyMat
run = CommandListTextureSetRemielleBlackBodyA
; RemyBlack Toe Nails (266)
if $Stockings == -1 && $Heels == -1
	if $ll_vis_pass_remielleblacklegsnbacka == 1
		$ll_vis_0_remielleblacklegsnback = $ll_vis_0_remielleblacklegsnback + 16384
	endif
	drawindexed = 840, 293988, 0

endif

[TextureOverrideRemielleBlackLegsnBackB]
hash = 09a51ed3
match_first_index = 15618
ib = ResourceRemielleBlackLegsnBackBIB
run = CommandList\ZZMI\SetTextures
; HLSL must sample the character source, so this is the one
; controlled snapshot in the viewport path.  It happens once per
; probe generation (not once per part/draw/frame) and supplies an
; SRV-compatible texture just like TTL's PortraitRT.
if $ll_viewport_probe_armed_remielleblacklegsnback == 1 && ResourceLLViewportSource === null
	ResourceLLViewportSource = copy o0 unless_null
endif
if $ObjectDetectAllowed_remielleblacklegsnback == 1
	run = CustomShaderLLBakeRemielleBlackLegsnBackB
	run = CustomShaderLLDetectRemielleBlackLegsnBack
	if $ll_jiggle_debug_dump == 1
		dump = ResourceLLDebugDetect_RemielleBlackLegsnBack
	endif
endif
; Live preview is disabled pending safe BakeRT synchronisation.
; The settle window keeps deforming after the modifier is released
; so the release oscillation is actually drawn -- solving it without
; applying it would leave the zone visibly frozen while the maths
; ran on regardless.
if $ll_jiggle_mode_remielleblacklegsnback == 1 || $ll_jiggle_settling_remielleblacklegsnback == 1
	; Only actually dispatch once per frame -- this hook can fire
	; multiple times per frame if the game reuses this draw call's
	; hash for other passes (shadows, reflections). Every pass still
	; needs the deformed result, so vb0 is rebound unconditionally
	; below; only the expensive recompute is skipped on repeats.
	if time != $ll_jiggle_last_dispatch_remielleblacklegsnback
		run = CustomShaderLLJiggleRemielleBlackLegsnBack
		$ll_jiggle_last_dispatch_remielleblacklegsnback = time
		if $ll_jiggle_debug_dump == 1
			dump = ResourceLLDebugJiggle_RemielleBlackLegsnBack
		endif
		if $ll_jiggle_vertex_debug_dump == 1
			dump = ResourceLLDebugJiggleVertex_RemielleBlackLegsnBack
		endif
	endif
	vb0 = ResourceLLJiggleTempVB0_RemielleBlackLegsnBack
endif

; First fire of this part this frame? The hook repeats for
; shadow/reflection passes, and the visibility bits below add
; rather than OR, so a repeated add carries into the next mesh's
; bit. Draws still run every pass; only the bookkeeping is once.
$ll_vis_pass_remielleblacklegsnbackb = 0
if time != $ll_vis_frame_remielleblacklegsnbackb
	$ll_vis_frame_remielleblacklegsnbackb = time
	$ll_vis_pass_remielleblacklegsnbackb = 1
endif
; RemielleBlackLegsnBackB
; RemyBlack Stocking.Stitching (42)
if $Stockings == 0
	if $ll_vis_pass_remielleblacklegsnbackb == 1
		$ll_vis_0_remielleblacklegsnback = $ll_vis_0_remielleblacklegsnback + 32768
	endif
	drawindexed = 114, 0, 0

endif

[TextureOverrideRemielleBlackWingsIB]
hash = 9004a39a
handling = skip

[TextureOverrideRemielleBlackWingsA]
hash = 9004a39a
match_first_index = 0
ib = ResourceRemielleBlackWingsAIB
Resource\ZZMI\Diffuse = ref ResourceRemielleBlackWingsADiffuse
Resource\ZZMI\NormalMap = ref ResourceRemielleBlackWingsANormalMap
Resource\ZZMI\WEngineFX = ref ResourceRemielleBlackWingsAWEngineFX
run = CommandList\ZZMI\SetTextures
            
; First fire of this part this frame? The hook repeats for
; shadow/reflection passes, and the visibility bits below add
; rather than OR, so a repeated add carries into the next mesh's
; bit. Draws still run every pass; only the bookkeeping is once.
$ll_vis_pass_remielleblackwingsa = 0
if time != $ll_vis_frame_remielleblackwingsa
	$ll_vis_frame_remielleblackwingsa = time
	$ll_vis_pass_remielleblackwingsa = 1
endif
; RemielleBlackWingsA
; RemyBlack Wings (5404)
if $Wings == 0
	if $ll_vis_pass_remielleblackwingsa == 1
		$ll_vis_0_remielleblacklegsnback = $ll_vis_0_remielleblacklegsnback + 65536
	endif
	drawindexed = 20472, 0, 0

endif

[TextureOverrideRemielleBlackHairIB]
hash = 789ae812
handling = skip

[TextureOverrideRemielleBlackHairA]
hash = 789ae812
match_first_index = 0
ib = ResourceRemielleBlackHairAIB
Resource\ZZMI\Diffuse = ref ResourceRemielleBlackHairADiffuse
run = CommandList\ZZMI\SetTextures
; HLSL must sample the character source, so this is the one
; controlled snapshot in the viewport path.  It happens once per
; probe generation (not once per part/draw/frame) and supplies an
; SRV-compatible texture just like TTL's PortraitRT.
if $ll_viewport_probe_armed_remielleblacklegsnback == 1 && ResourceLLViewportSource === null
	ResourceLLViewportSource = copy o0 unless_null
endif
if $ObjectDetectAllowed_remielleblacklegsnback == 1
	run = CustomShaderLLBakeRemielleBlackHairA
	run = CustomShaderLLDetectRemielleBlackHair
	if $ll_jiggle_debug_dump == 1
		dump = ResourceLLDebugDetect_RemielleBlackHair
	endif
endif
; Live preview is disabled pending safe BakeRT synchronisation.
; The settle window keeps deforming after the modifier is released
; so the release oscillation is actually drawn -- solving it without
; applying it would leave the zone visibly frozen while the maths
; ran on regardless.
if $ll_jiggle_mode_remielleblacklegsnback == 1 || $ll_jiggle_settling_remielleblacklegsnback == 1
	; Only actually dispatch once per frame -- this hook can fire
	; multiple times per frame if the game reuses this draw call's
	; hash for other passes (shadows, reflections). Every pass still
	; needs the deformed result, so vb0 is rebound unconditionally
	; below; only the expensive recompute is skipped on repeats.
	if time != $ll_jiggle_last_dispatch_remielleblackhair
		run = CustomShaderLLJiggleRemielleBlackHair
		$ll_jiggle_last_dispatch_remielleblackhair = time
		if $ll_jiggle_debug_dump == 1
			dump = ResourceLLDebugJiggle_RemielleBlackHair
		endif
		if $ll_jiggle_vertex_debug_dump == 1
			dump = ResourceLLDebugJiggleVertex_RemielleBlackHair
		endif
	endif
	vb0 = ResourceLLJiggleTempVB0_RemielleBlackHair
endif

; First fire of this part this frame? The hook repeats for
; shadow/reflection passes, and the visibility bits below add
; rather than OR, so a repeated add carries into the next mesh's
; bit. Draws still run every pass; only the bookkeeping is once.
$ll_vis_pass_remielleblackhaira = 0
if time != $ll_vis_frame_remielleblackhaira
	$ll_vis_frame_remielleblackhaira = time
	$ll_vis_pass_remielleblackhaira = 1
endif
; RemielleBlackHairA
; RemyBlack Back Hair (4256)
drawindexed = 16590, 0, 0

[TextureOverrideRemielleBlackHairB]
hash = 789ae812
match_first_index = 16590
ib = ResourceRemielleBlackHairBIB
run = CommandList\ZZMI\SetTextures
; HLSL must sample the character source, so this is the one
; controlled snapshot in the viewport path.  It happens once per
; probe generation (not once per part/draw/frame) and supplies an
; SRV-compatible texture just like TTL's PortraitRT.
if $ll_viewport_probe_armed_remielleblacklegsnback == 1 && ResourceLLViewportSource === null
	ResourceLLViewportSource = copy o0 unless_null
endif
if $ObjectDetectAllowed_remielleblacklegsnback == 1
	run = CustomShaderLLBakeRemielleBlackHairB
	run = CustomShaderLLDetectRemielleBlackHair
	if $ll_jiggle_debug_dump == 1
		dump = ResourceLLDebugDetect_RemielleBlackHair
	endif
endif
; Live preview is disabled pending safe BakeRT synchronisation.
; The settle window keeps deforming after the modifier is released
; so the release oscillation is actually drawn -- solving it without
; applying it would leave the zone visibly frozen while the maths
; ran on regardless.
if $ll_jiggle_mode_remielleblacklegsnback == 1 || $ll_jiggle_settling_remielleblacklegsnback == 1
	; Only actually dispatch once per frame -- this hook can fire
	; multiple times per frame if the game reuses this draw call's
	; hash for other passes (shadows, reflections). Every pass still
	; needs the deformed result, so vb0 is rebound unconditionally
	; below; only the expensive recompute is skipped on repeats.
	if time != $ll_jiggle_last_dispatch_remielleblackhair
		run = CustomShaderLLJiggleRemielleBlackHair
		$ll_jiggle_last_dispatch_remielleblackhair = time
		if $ll_jiggle_debug_dump == 1
			dump = ResourceLLDebugJiggle_RemielleBlackHair
		endif
		if $ll_jiggle_vertex_debug_dump == 1
			dump = ResourceLLDebugJiggleVertex_RemielleBlackHair
		endif
	endif
	vb0 = ResourceLLJiggleTempVB0_RemielleBlackHair
endif

; First fire of this part this frame? The hook repeats for
; shadow/reflection passes, and the visibility bits below add
; rather than OR, so a repeated add carries into the next mesh's
; bit. Draws still run every pass; only the bookkeeping is once.
$ll_vis_pass_remielleblackhairb = 0
if time != $ll_vis_frame_remielleblackhairb
	$ll_vis_frame_remielleblackhairb = time
	$ll_vis_pass_remielleblackhairb = 1
endif
; RemielleBlackHairB
; RemyBlack Front Hair (3054)
drawindexed = 11451, 0, 0

[TextureOverrideRemielleBlackBodyIB]
hash = f57f3e40
handling = skip

[TextureOverrideRemielleBlackBodyA]
hash = f57f3e40
match_first_index = 0
ib = ResourceRemielleBlackBodyAIB
Resource\ZZMI\Diffuse = ref ResourceRemielleBlackBodyADiffuse
Resource\ZZMI\NormalMap = ref ResourceRemielleBlackBodyANormalMap
Resource\ZZMI\LightMap = ref ResourceRemielleBlackBodyALightMap
Resource\ZZMI\MaterialMap = ref ResourceRemielleBlackBodyAMaterialMap
run = CommandList\ZZMI\SetTextures
; HLSL must sample the character source, so this is the one
; controlled snapshot in the viewport path.  It happens once per
; probe generation (not once per part/draw/frame) and supplies an
; SRV-compatible texture just like TTL's PortraitRT.
if $ll_viewport_probe_armed_remielleblacklegsnback == 1 && ResourceLLViewportSource === null
	ResourceLLViewportSource = copy o0 unless_null
endif
if $ObjectDetectAllowed_remielleblacklegsnback == 1
	run = CustomShaderLLBakeRemielleBlackBodyA
	run = CustomShaderLLDetectRemielleBlackBody
	if $ll_jiggle_debug_dump == 1
		dump = ResourceLLDebugDetect_RemielleBlackBody
	endif
endif
; Live preview is disabled pending safe BakeRT synchronisation.
; The settle window keeps deforming after the modifier is released
; so the release oscillation is actually drawn -- solving it without
; applying it would leave the zone visibly frozen while the maths
; ran on regardless.
if $ll_jiggle_mode_remielleblacklegsnback == 1 || $ll_jiggle_settling_remielleblacklegsnback == 1
	; Only actually dispatch once per frame -- this hook can fire
	; multiple times per frame if the game reuses this draw call's
	; hash for other passes (shadows, reflections). Every pass still
	; needs the deformed result, so vb0 is rebound unconditionally
	; below; only the expensive recompute is skipped on repeats.
	if time != $ll_jiggle_last_dispatch_remielleblackbody
		run = CustomShaderLLJiggleRemielleBlackBody
		$ll_jiggle_last_dispatch_remielleblackbody = time
		if $ll_jiggle_debug_dump == 1
			dump = ResourceLLDebugJiggle_RemielleBlackBody
		endif
		if $ll_jiggle_vertex_debug_dump == 1
			dump = ResourceLLDebugJiggleVertex_RemielleBlackBody
		endif
	endif
	vb0 = ResourceLLJiggleTempVB0_RemielleBlackBody
endif

; First fire of this part this frame? The hook repeats for
; shadow/reflection passes, and the visibility bits below add
; rather than OR, so a repeated add carries into the next mesh's
; bit. Draws still run every pass; only the bookkeeping is once.
$ll_vis_pass_remielleblackbodya = 0
if time != $ll_vis_frame_remielleblackbodya
	$ll_vis_frame_remielleblackbodya = time
	$ll_vis_pass_remielleblackbodya = 1
endif
; RemielleBlackBodyA
; RemyBlack Back Hair.Ribbons (992)
if ($HairAccessories == 0 || $HairAccessories == 1)
	if $ll_vis_pass_remielleblackbodya == 1
		$ll_vis_0_remielleblacklegsnback = $ll_vis_0_remielleblacklegsnback + 131072
	endif
	drawindexed = 2400, 0, 0

endif

; RemyBlack Body.Hands.Nails (1084)
drawindexed = 4908, 2400, 0


; RemyBlack CollarTop (2770)
if ($Collar == 0 || $Collar == 1) && ($Sleeves == -1 || $Sleeves == 0 || $Sleeves == 1 || $Sleeves == 2)
	if $ll_vis_pass_remielleblackbodya == 1
		$ll_vis_0_remielleblacklegsnback = $ll_vis_0_remielleblacklegsnback + 262144
	endif
	drawindexed = 7617, 7308, 0

endif

; RemyBlack CollarTop.BackHanger.Ribbon (320)
if $Collar == 0 && ($Dress == 0 || $Dress == 1 || $Dress == 2 || $Dress == 3)
	if $ll_vis_pass_remielleblackbodya == 1
		$ll_vis_0_remielleblacklegsnback = $ll_vis_0_remielleblacklegsnback + 524288
	endif
	drawindexed = 900, 14925, 0

endif

; RemyBlack CollarTop.BackSkirtRibbon (1486)
if ($Dress == 0 || $Dress == 1 || $Dress == 2 || $Dress == 3)
	if $ll_vis_pass_remielleblackbodya == 1
		$ll_vis_0_remielleblacklegsnback = $ll_vis_0_remielleblacklegsnback + 1048576
	endif
	drawindexed = 4680, 15825, 0

endif

; RemyBlack CollarTop.Frills (71)
if $Collar == 0
	if $ll_vis_pass_remielleblackbodya == 1
		$ll_vis_0_remielleblacklegsnback = $ll_vis_0_remielleblacklegsnback + 2097152
	endif
	drawindexed = 261, 20505, 0

endif

; RemyBlack Dress.BackSkirt (619)
if $Dress == 3
	if $ll_vis_pass_remielleblackbodya == 1
		$ll_vis_0_remielleblacklegsnback = $ll_vis_0_remielleblacklegsnback + 4194304
	endif
	drawindexed = 2484, 20766, 0

endif

; RemyBlack Dress.NoSheers (5249)
if $Dress == 2
	if $ll_vis_pass_remielleblackbodya == 1
		$ll_vis_0_remielleblacklegsnback = $ll_vis_0_remielleblacklegsnback + 8388608
	endif
	drawindexed = 16554, 23250, 0

endif

; RemyBlack Dress.OG (5330)
if $Dress == 0
	if $ll_vis_pass_remielleblackbodya == 1
		$ll_vis_1_remielleblacklegsnback = $ll_vis_1_remielleblacklegsnback + 1
	endif
	drawindexed = 16890, 39804, 0

endif

; RemyBlack Dress.Short (5330)
if $Dress == 1
	if $ll_vis_pass_remielleblackbodya == 1
		$ll_vis_1_remielleblacklegsnback = $ll_vis_1_remielleblacklegsnback + 2
	endif
	drawindexed = 16890, 56694, 0

endif

; RemyBlack Dress.Skirtless (3835)
if ($Dress == 3 || $Dress == 4)
	if $ll_vis_pass_remielleblackbodya == 1
		$ll_vis_1_remielleblacklegsnback = $ll_vis_1_remielleblacklegsnback + 4
	endif
	drawindexed = 11841, 73584, 0

endif

; RemyBlack Dress.Topless (2130)
if $Dress == 5
	if $ll_vis_pass_remielleblackbodya == 1
		$ll_vis_1_remielleblacklegsnback = $ll_vis_1_remielleblacklegsnback + 8
	endif
	drawindexed = 5967, 85425, 0

endif

; RemyBlack Front Hair.Clips (160)
if ($HairAccessories == 0 || $HairAccessories == 2)
	if $ll_vis_pass_remielleblackbodya == 1
		$ll_vis_1_remielleblacklegsnback = $ll_vis_1_remielleblacklegsnback + 16
	endif
	drawindexed = 312, 91392, 0

endif

; RemyBlack Heels.Accessories (1284)
if $Heels == 0
	if $ll_vis_pass_remielleblackbodya == 1
		$ll_vis_1_remielleblacklegsnback = $ll_vis_1_remielleblacklegsnback + 32
	endif
	drawindexed = 2940, 91704, 0

endif

; RemyBlack OG Hands (2128)
; skipped (Hidden — mesh parked in Blender, toggle setup kept)

; RemyBlack OG NeckJaw (378)
if ($Collar == 0 || $Collar == 1)
	if $ll_vis_pass_remielleblackbodya == 1
		$ll_vis_1_remielleblacklegsnback = $ll_vis_1_remielleblacklegsnback + 128
	endif
	drawindexed = 1578, 104256, 0

endif

; RemyBlack OG Ring (72)
drawindexed = 288, 105834, 0


; RemyBlack Sleeves.NoSheers (3084)
if $Sleeves == 2
	if $ll_vis_pass_remielleblackbodya == 1
		$ll_vis_1_remielleblacklegsnback = $ll_vis_1_remielleblacklegsnback + 256
	endif
	drawindexed = 8958, 106122, 0

endif

; RemyBlack Sleeves.ShoulderCovers (298)
if $Sleeves == 0 && ($Collar == 0 || $Collar == 1)
	if $ll_vis_pass_remielleblackbodya == 1
		$ll_vis_1_remielleblacklegsnback = $ll_vis_1_remielleblacklegsnback + 512
	endif
	drawindexed = 1326, 115080, 0

endif

; RemyBlack Sleeves.WSheers (3796)
if ($Sleeves == 0 || $Sleeves == 1)
	if $ll_vis_pass_remielleblackbodya == 1
		$ll_vis_1_remielleblacklegsnback = $ll_vis_1_remielleblacklegsnback + 1024
	endif
	drawindexed = 11784, 116406, 0

endif

; RemyBlack Stocking.Accessories (1042)
if $Stockings == 0
	if $ll_vis_pass_remielleblackbodya == 1
		$ll_vis_1_remielleblacklegsnback = $ll_vis_1_remielleblacklegsnback + 2048
	endif
	drawindexed = 2478, 128190, 0

endif

; BodyA Skin
run = CommandListTextureSetremiellebody
; RemyBlack Body.Arms (1868)
if $Sleeves == -1
	if $ll_vis_pass_remielleblackbodya == 1
		$ll_vis_1_remielleblacklegsnback = $ll_vis_1_remielleblacklegsnback + 4096
	endif
	drawindexed = 10314, 130668, 0

endif

; RemyBlack Body.Arms.UnderSleeves.Full (506)
if ($Sleeves == 0 || $Sleeves == 1)
	if $ll_vis_pass_remielleblackbodya == 1
		$ll_vis_1_remielleblacklegsnback = $ll_vis_1_remielleblacklegsnback + 8192
	endif
	drawindexed = 2454, 140982, 0

endif

; RemyBlack Body.Arms.UnderSleeves.NoSheer (1868)
if $Sleeves == 2
	if $ll_vis_pass_remielleblackbodya == 1
		$ll_vis_1_remielleblacklegsnback = $ll_vis_1_remielleblacklegsnback + 16384
	endif
	drawindexed = 10314, 143436, 0

endif

; RemyBlack Body.Chest.FullTop (4066)
if ($Dress == 0 || $Dress == 1 || $Dress == 2 || $Dress == 3 || $Dress == 4) && ($Collar == 0 || $Collar == 1)
	if $ll_vis_pass_remielleblackbodya == 1
		$ll_vis_1_remielleblacklegsnback = $ll_vis_1_remielleblacklegsnback + 32768
	endif
	drawindexed = 21258, 153750, 0

endif

; RemyBlack Body.Chest.Nipples (560)
if ($Dress == -1 || $Dress == 5)
	if $ll_vis_pass_remielleblackbodya == 1
		$ll_vis_1_remielleblacklegsnback = $ll_vis_1_remielleblacklegsnback + 65536
	endif
	drawindexed = 3132, 175008, 0

endif

; RemyBlack Body.Chest.TopOnly (4066)
if ($Dress == 0 || $Dress == 1 || $Dress == 2 || $Dress == 3 || $Dress == 4) && $Collar == -1
	if $ll_vis_pass_remielleblackbodya == 1
		$ll_vis_1_remielleblacklegsnback = $ll_vis_1_remielleblacklegsnback + 131072
	endif
	drawindexed = 21258, 178140, 0

endif

; RemyBlack Body.Chest.Topless (4066)
if ($Dress == -1 || $Dress == 5) && $Collar == -1
	if $ll_vis_pass_remielleblackbodya == 1
		$ll_vis_1_remielleblacklegsnback = $ll_vis_1_remielleblacklegsnback + 262144
	endif
	drawindexed = 21258, 199398, 0

endif

; RemyBlack Body.Chest.UpperTopOnly (4066)
if ($Dress == -1 || $Dress == 5) && ($Collar == 0 || $Collar == 1)
	if $ll_vis_pass_remielleblackbodya == 1
		$ll_vis_1_remielleblacklegsnback = $ll_vis_1_remielleblacklegsnback + 524288
	endif
	drawindexed = 21258, 220656, 0

endif

; RemyBlack Body.Hands (6146)
drawindexed = 31632, 241914, 0


; RemyBlack Body.NeckJaw (695)
if $Collar == -1
	if $ll_vis_pass_remielleblackbodya == 1
		$ll_vis_1_remielleblacklegsnback = $ll_vis_1_remielleblacklegsnback + 1048576
	endif
	drawindexed = 3210, 273546, 0

endif

[TextureOverrideRemielleBlackBodyB]
hash = f57f3e40
match_first_index = 64092
ib = ResourceRemielleBlackBodyBIB
run = CommandList\ZZMI\SetTextures
; HLSL must sample the character source, so this is the one
; controlled snapshot in the viewport path.  It happens once per
; probe generation (not once per part/draw/frame) and supplies an
; SRV-compatible texture just like TTL's PortraitRT.
if $ll_viewport_probe_armed_remielleblacklegsnback == 1 && ResourceLLViewportSource === null
	ResourceLLViewportSource = copy o0 unless_null
endif
if $ObjectDetectAllowed_remielleblacklegsnback == 1
	run = CustomShaderLLBakeRemielleBlackBodyB
	run = CustomShaderLLDetectRemielleBlackBody
	if $ll_jiggle_debug_dump == 1
		dump = ResourceLLDebugDetect_RemielleBlackBody
	endif
endif
; Live preview is disabled pending safe BakeRT synchronisation.
; The settle window keeps deforming after the modifier is released
; so the release oscillation is actually drawn -- solving it without
; applying it would leave the zone visibly frozen while the maths
; ran on regardless.
if $ll_jiggle_mode_remielleblacklegsnback == 1 || $ll_jiggle_settling_remielleblacklegsnback == 1
	; Only actually dispatch once per frame -- this hook can fire
	; multiple times per frame if the game reuses this draw call's
	; hash for other passes (shadows, reflections). Every pass still
	; needs the deformed result, so vb0 is rebound unconditionally
	; below; only the expensive recompute is skipped on repeats.
	if time != $ll_jiggle_last_dispatch_remielleblackbody
		run = CustomShaderLLJiggleRemielleBlackBody
		$ll_jiggle_last_dispatch_remielleblackbody = time
		if $ll_jiggle_debug_dump == 1
			dump = ResourceLLDebugJiggle_RemielleBlackBody
		endif
		if $ll_jiggle_vertex_debug_dump == 1
			dump = ResourceLLDebugJiggleVertex_RemielleBlackBody
		endif
	endif
	vb0 = ResourceLLJiggleTempVB0_RemielleBlackBody
endif

; First fire of this part this frame? The hook repeats for
; shadow/reflection passes, and the visibility bits below add
; rather than OR, so a repeated add carries into the next mesh's
; bit. Draws still run every pass; only the bookkeeping is once.
$ll_vis_pass_remielleblackbodyb = 0
if time != $ll_vis_frame_remielleblackbodyb
	$ll_vis_frame_remielleblackbodyb = time
	$ll_vis_pass_remielleblackbodyb = 1
endif
; RemielleBlackBodyB
; RemyBlack Back Sheer Strips (62)
if $Dress == 0
	if $ll_vis_pass_remielleblackbodyb == 1
		$ll_vis_1_remielleblacklegsnback = $ll_vis_1_remielleblacklegsnback + 2097152
	endif
	drawindexed = 174, 0, 0

endif

; RemyBlack Front Window (16)
; skipped (empty toggle bits)

[TextureOverrideRemielleBlackMaskIB]
hash = f89dd462
handling = skip

[TextureOverrideRemielleBlackMaskA]
hash = f89dd462
match_first_index = 0
ib = ResourceRemielleBlackMaskAIB
Resource\ZZMI\Diffuse = ref ResourceRemielleBlackMaskADiffuse
Resource\ZZMI\NormalMap = ref ResourceRemielleBlackMaskANormalMap
Resource\ZZMI\LightMap = ref ResourceRemielleBlackMaskALightMap
Resource\ZZMI\MaterialMap = ref ResourceRemielleBlackMaskAMaterialMap
run = CommandList\ZZMI\SetTextures
            
; First fire of this part this frame? The hook repeats for
; shadow/reflection passes, and the visibility bits below add
; rather than OR, so a repeated add carries into the next mesh's
; bit. Draws still run every pass; only the bookkeeping is once.
$ll_vis_pass_remielleblackmaska = 0
if time != $ll_vis_frame_remielleblackmaska
	$ll_vis_frame_remielleblackmaska = time
	$ll_vis_pass_remielleblackmaska = 1
endif
; 
; RemielleBlackMaskA (320)
if $Facemask == 0
	if $ll_vis_pass_remielleblackmaska == 1
		$ll_vis_1_remielleblacklegsnback = $ll_vis_1_remielleblacklegsnback + 8388608
	endif
	drawindexed = 1440, 0, 0

endif



; CommandList -----------------------

[CommandListCreditInfo]
if $creditinfo == 0 && $active > 0
	pre Resource\ShaderFixes\help.ini\Notification = ResourceCreditInfo
	pre run = CustomShader\ShaderFixes\help.ini\FormatText
	pre $\ShaderFixes\help.ini\notification_timeout = time + 5.0
	$creditinfo = 1
endif

; === LLMenuEXT ll_post: TextureSets (declare) ===

[CommandListTextureSetremiellebody]
Resource\ZZMI\Diffuse = ref ResourceremiellebodyDiffuse
Resource\ZZMI\LightMap = ref ResourceremiellebodyLightMap
Resource\ZZMI\MaterialMap = ref ResourceremiellebodyMaterialMap
Resource\ZZMI\NormalMap = ref ResourceremiellebodyNormalMap
run = CommandList\ZZMI\SetTextures

[CommandListTextureSetRemielleBlackBodyA]
Resource\ZZMI\Diffuse = ref ResourceRemielleBlackBodyADiffuse
Resource\ZZMI\LightMap = ref ResourceRemielleBlackBodyALightMap
Resource\ZZMI\MaterialMap = ref ResourceRemielleBlackBodyAMaterialMap
Resource\ZZMI\NormalMap = ref ResourceRemielleBlackBodyANormalMap
run = CommandList\ZZMI\SetTextures
; === User CommandLists (per-entry body) ===

; === Save / Load / Random / Reset — KeyPress + GUI share these CLs ===

[CommandListSaveA]
$ADress = $Dress
$ASleeves = $Sleeves
$ACollar = $Collar
$AStockings = $Stockings
$AHeels = $Heels
$AWings = $Wings
$AHairAccessories = $HairAccessories
$ABottom = $Bottom
$AFacemask = $Facemask
pre Resource\ShaderFixes\help.ini\Notification = ResourceSaveAInfo
pre run = CustomShader\ShaderFixes\help.ini\FormatText
pre $\ShaderFixes\help.ini\notification_timeout = time + 2.0

[CommandListLoadA]
$Dress = $ADress
$Sleeves = $ASleeves
$Collar = $ACollar
$Stockings = $AStockings
$Heels = $AHeels
$Wings = $AWings
$HairAccessories = $AHairAccessories
$Bottom = $ABottom
$Facemask = $AFacemask
pre Resource\ShaderFixes\help.ini\Notification = ResourceLoadAInfo
pre run = CustomShader\ShaderFixes\help.ini\FormatText
pre $\ShaderFixes\help.ini\notification_timeout = time + 2.0

[CommandListSaveB]
$BDress = $Dress
$BSleeves = $Sleeves
$BCollar = $Collar
$BStockings = $Stockings
$BHeels = $Heels
$BWings = $Wings
$BHairAccessories = $HairAccessories
$BBottom = $Bottom
$BFacemask = $Facemask
pre Resource\ShaderFixes\help.ini\Notification = ResourceSaveBInfo
pre run = CustomShader\ShaderFixes\help.ini\FormatText
pre $\ShaderFixes\help.ini\notification_timeout = time + 2.0

[CommandListLoadB]
$Dress = $BDress
$Sleeves = $BSleeves
$Collar = $BCollar
$Stockings = $BStockings
$Heels = $BHeels
$Wings = $BWings
$HairAccessories = $BHairAccessories
$Bottom = $BBottom
$Facemask = $BFacemask
pre Resource\ShaderFixes\help.ini\Notification = ResourceLoadBInfo
pre run = CustomShader\ShaderFixes\help.ini\FormatText
pre $\ShaderFixes\help.ini\notification_timeout = time + 2.0

[CommandListSaveC]
$CDress = $Dress
$CSleeves = $Sleeves
$CCollar = $Collar
$CStockings = $Stockings
$CHeels = $Heels
$CWings = $Wings
$CHairAccessories = $HairAccessories
$CBottom = $Bottom
$CFacemask = $Facemask
pre Resource\ShaderFixes\help.ini\Notification = ResourceSaveCInfo
pre run = CustomShader\ShaderFixes\help.ini\FormatText
pre $\ShaderFixes\help.ini\notification_timeout = time + 2.0

[CommandListLoadC]
$Dress = $CDress
$Sleeves = $CSleeves
$Collar = $CCollar
$Stockings = $CStockings
$Heels = $CHeels
$Wings = $CWings
$HairAccessories = $CHairAccessories
$Bottom = $CBottom
$Facemask = $CFacemask
pre Resource\ShaderFixes\help.ini\Notification = ResourceLoadCInfo
pre run = CustomShader\ShaderFixes\help.ini\FormatText
pre $\ShaderFixes\help.ini\notification_timeout = time + 2.0

[CommandListSaveD]
$DDress = $Dress
$DSleeves = $Sleeves
$DCollar = $Collar
$DStockings = $Stockings
$DHeels = $Heels
$DWings = $Wings
$DHairAccessories = $HairAccessories
$DBottom = $Bottom
$DFacemask = $Facemask
pre Resource\ShaderFixes\help.ini\Notification = ResourceSaveDInfo
pre run = CustomShader\ShaderFixes\help.ini\FormatText
pre $\ShaderFixes\help.ini\notification_timeout = time + 2.0

[CommandListLoadD]
$Dress = $DDress
$Sleeves = $DSleeves
$Collar = $DCollar
$Stockings = $DStockings
$Heels = $DHeels
$Wings = $DWings
$HairAccessories = $DHairAccessories
$Bottom = $DBottom
$Facemask = $DFacemask
pre Resource\ShaderFixes\help.ini\Notification = ResourceLoadDInfo
pre run = CustomShader\ShaderFixes\help.ini\FormatText
pre $\ShaderFixes\help.ini\notification_timeout = time + 2.0

[CommandListRandomAll]
; Off-state keys draw over max_length+1 slots so -1 is reachable; the top slot
; maps to it. Without that a plain on/off toggle (max_length 1) would roll
; %1 == 0 forever and never randomize at all.
$Dress = (time*80)%7//1
if $Dress == 6
	$Dress = -1
endif
$Sleeves = (time*120)%5//1
if $Sleeves == 4
	$Sleeves = -1
endif
$Collar = (time*160)%3//1
if $Collar == 2
	$Collar = -1
endif
$Stockings = (time*200)%2//1
if $Stockings == 1
	$Stockings = -1
endif
$Heels = (time*240)%2//1
if $Heels == 1
	$Heels = -1
endif
$Wings = (time*280)%2//1
if $Wings == 1
	$Wings = -1
endif
$HairAccessories = (time*320)%4//1
if $HairAccessories == 3
	$HairAccessories = -1
endif
$Bottom = (time*360)%4//1
if $Bottom == 3
	$Bottom = -1
endif
$Facemask = (time*400)%2//1
if $Facemask == 1
	$Facemask = -1
endif
pre Resource\ShaderFixes\help.ini\Notification = ResourceRandomAllInfo
pre run = CustomShader\ShaderFixes\help.ini\FormatText
pre $\ShaderFixes\help.ini\notification_timeout = time + 2.0

[CommandListResetAll]
$Dress = 0
$Sleeves = 0
$Collar = 0
$Stockings = 0
$Heels = 0
$Wings = 0
$HairAccessories = 0
$Bottom = 0
$Facemask = 0
$outfit = 0
pre Resource\ShaderFixes\help.ini\Notification = ResourceResetInfo
pre run = CustomShader\ShaderFixes\help.ini\FormatText
pre $\ShaderFixes\help.ini\notification_timeout = time + 2.0

; === Unified outfit apply (single CL for KeyOutfit± and GUI prev/next) ===

[CommandListCycleOutfitNext]
if $outfit == 0
	$outfit = 0
endif
run = CommandListLLMenuApplyOutfit

[CommandListCycleOutfitPrev]
if $outfit == 0
	$outfit = 0
endif
run = CommandListLLMenuApplyOutfit

[CommandListLLMenuApplyOutfit]
if $outfit == 0
	$Dress = 0
	$Sleeves = 0
	$Collar = 0
	$Stockings = 0
	$Heels = 0
	$Wings = 0
	$HairAccessories = 0
	$Bottom = 0
	$Facemask = 0
	pre Resource\ShaderFixes\help.ini\Notification = ResourceOutfit0Info
	pre run = CustomShader\ShaderFixes\help.ini\FormatText
	pre $\ShaderFixes\help.ini\notification_timeout = time + 2.0
endif

; === Key cycle CommandLists (menu buttons) ===

[CommandListCycleDressNext]
if $Dress == 0
	$Dress = 1
elif $Dress == 1
	$Dress = 2
elif $Dress == 2
	$Dress = 3
elif $Dress == 3
	$Dress = 4
elif $Dress == 4
	$Dress = 5
elif $Dress == 5
	$Dress = -1
elif $Dress == -1
	$Dress = 0
endif

[CommandListCycleDressPrev]
if $Dress == 0
	$Dress = -1
elif $Dress == 1
	$Dress = 0
elif $Dress == 2
	$Dress = 1
elif $Dress == 3
	$Dress = 2
elif $Dress == 4
	$Dress = 3
elif $Dress == 5
	$Dress = 4
elif $Dress == -1
	$Dress = 5
endif

[CommandListCycleSleevesNext]
if $Sleeves == 0
	$Sleeves = 1
elif $Sleeves == 1
	$Sleeves = 2
elif $Sleeves == 2
	$Sleeves = 3
elif $Sleeves == 3
	$Sleeves = -1
elif $Sleeves == -1
	$Sleeves = 0
endif

[CommandListCycleSleevesPrev]
if $Sleeves == 0
	$Sleeves = -1
elif $Sleeves == 1
	$Sleeves = 0
elif $Sleeves == 2
	$Sleeves = 1
elif $Sleeves == 3
	$Sleeves = 2
elif $Sleeves == -1
	$Sleeves = 3
endif

[CommandListCycleCollarNext]
if $Collar == 0
	$Collar = 1
elif $Collar == 1
	$Collar = -1
elif $Collar == -1
	$Collar = 0
endif

[CommandListCycleCollarPrev]
if $Collar == 0
	$Collar = -1
elif $Collar == 1
	$Collar = 0
elif $Collar == -1
	$Collar = 1
endif

[CommandListCycleStockingsNext]
if $Stockings == 0
	$Stockings = -1
elif $Stockings == -1
	$Stockings = 0
endif

[CommandListCycleStockingsPrev]
if $Stockings == 0
	$Stockings = -1
elif $Stockings == -1
	$Stockings = 0
endif

[CommandListCycleHeelsNext]
if $Heels == 0
	$Heels = -1
elif $Heels == -1
	$Heels = 0
endif

[CommandListCycleHeelsPrev]
if $Heels == 0
	$Heels = -1
elif $Heels == -1
	$Heels = 0
endif

[CommandListCycleWingsNext]
if $Wings == 0
	$Wings = -1
elif $Wings == -1
	$Wings = 0
endif

[CommandListCycleWingsPrev]
if $Wings == 0
	$Wings = -1
elif $Wings == -1
	$Wings = 0
endif

[CommandListCycleHairAccessoriesNext]
if $HairAccessories == 0
	$HairAccessories = 1
elif $HairAccessories == 1
	$HairAccessories = 2
elif $HairAccessories == 2
	$HairAccessories = -1
elif $HairAccessories == -1
	$HairAccessories = 0
endif

[CommandListCycleHairAccessoriesPrev]
if $HairAccessories == 0
	$HairAccessories = -1
elif $HairAccessories == 1
	$HairAccessories = 0
elif $HairAccessories == 2
	$HairAccessories = 1
elif $HairAccessories == -1
	$HairAccessories = 2
endif

[CommandListCycleBottomNext]
if $Bottom == 0
	$Bottom = 1
elif $Bottom == 1
	$Bottom = 2
elif $Bottom == 2
	$Bottom = -1
elif $Bottom == -1
	$Bottom = 0
endif

[CommandListCycleBottomPrev]
if $Bottom == 0
	$Bottom = -1
elif $Bottom == 1
	$Bottom = 0
elif $Bottom == 2
	$Bottom = 1
elif $Bottom == -1
	$Bottom = 2
endif

[CommandListCycleFacemaskNext]
if $Facemask == 0
	$Facemask = -1
elif $Facemask == -1
	$Facemask = 0
endif

[CommandListCycleFacemaskPrev]
if $Facemask == 0
	$Facemask = -1
elif $Facemask == -1
	$Facemask = 0
endif


; menu disabled — still evaluate StatesVar / Derived Rules from keys



; === LLMenuEXT TextureSet + Menu Resources ===

[ResourceremiellebodyDiffuse]
filename = remiellebodyDiffuse.dds

[ResourceremiellebodyLightMap]
filename = remiellebodyLightMap.dds

[ResourceremiellebodyMaterialMap]
filename = remiellebodyMaterialMap.dds

[ResourceremiellebodyNormalMap]
filename = remiellebodyNormalMap.dds

[ResourceRemielleBlackBodyADiffuse]
filename = RemielleBlackBodyADiffuse.dds

[ResourceRemielleBlackBodyALightMap]
filename = RemielleBlackBodyALightMap.dds

[ResourceRemielleBlackBodyAMaterialMap]
filename = RemielleBlackBodyAMaterialMap.dds

[ResourceRemielleBlackBodyANormalMap]
filename = RemielleBlackBodyANormalMap.dds
; --- Notification buffers (help.ini FormatText) — always (Key + GUI share CLs) ---

[ResourceSaveAInfo]
type = Buffer
data = "Outfit A Saved"

[ResourceLoadAInfo]
type = Buffer
data = "Outfit A Loaded"

[ResourceSaveBInfo]
type = Buffer
data = "Outfit B Saved"

[ResourceLoadBInfo]
type = Buffer
data = "Outfit B Loaded"

[ResourceSaveCInfo]
type = Buffer
data = "Outfit C Saved"

[ResourceLoadCInfo]
type = Buffer
data = "Outfit C Loaded"

[ResourceSaveDInfo]
type = Buffer
data = "Outfit D Saved"

[ResourceLoadDInfo]
type = Buffer
data = "Outfit D Loaded"

[ResourceRandomAllInfo]
type = Buffer
data = "Randomized All Slots"

[ResourceResetInfo]
type = Buffer
data = "Reset To Defaults"

[ResourceOutfit0Info]
type = Buffer
data = "Multitoggle Preset Outfit 0 selected"


; --- Transparency Resources ---
; --- Run Resize Present handler (EGS-safe deferred init inside CL) ---

[Present]
run = CommandListResizePresent
; Resources -------------------------

[ResourceRemielleBlackLegsnBackPosition]
type = Buffer
stride = 40
filename = RemielleBlackLegsnBackPosition.buf

[ResourceRemielleBlackLegsnBackBlend]
type = Buffer
stride = 32
filename = RemielleBlackLegsnBackBlend.buf

[ResourceRemielleBlackLegsnBackTexcoord]
type = Buffer
stride = 20
filename = RemielleBlackLegsnBackTexcoord.buf

[ResourceRemielleBlackLegsnBackAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = RemielleBlackLegsnBackA.ib

[ResourceRemielleBlackLegsnBackBIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = RemielleBlackLegsnBackB.ib

[ResourceRemielleBlackWingsPosition]
type = Buffer
stride = 40
filename = RemielleBlackWingsPosition.buf

[ResourceRemielleBlackWingsBlend]
type = Buffer
stride = 32
filename = RemielleBlackWingsBlend.buf

[ResourceRemielleBlackWingsTexcoord]
type = Buffer
stride = 20
filename = RemielleBlackWingsTexcoord.buf

[ResourceRemielleBlackWingsAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = RemielleBlackWingsA.ib

[ResourceRemielleBlackHairPosition]
type = Buffer
stride = 40
filename = RemielleBlackHairPosition.buf

[ResourceRemielleBlackHairBlend]
type = Buffer
stride = 32
filename = RemielleBlackHairBlend.buf

[ResourceRemielleBlackHairTexcoord]
type = Buffer
stride = 20
filename = RemielleBlackHairTexcoord.buf

[ResourceRemielleBlackHairAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = RemielleBlackHairA.ib

[ResourceRemielleBlackHairBIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = RemielleBlackHairB.ib

[ResourceRemielleBlackBodyPosition]
type = Buffer
stride = 40
filename = RemielleBlackBodyPosition.buf

[ResourceRemielleBlackBodyBlend]
type = Buffer
stride = 32
filename = RemielleBlackBodyBlend.buf

[ResourceRemielleBlackBodyTexcoord]
type = Buffer
stride = 24
filename = RemielleBlackBodyTexcoord.buf

[ResourceRemielleBlackBodyAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = RemielleBlackBodyA.ib

[ResourceRemielleBlackBodyBIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = RemielleBlackBodyB.ib

[ResourceRemielleBlackMaskPosition]
type = Buffer
stride = 40
filename = RemielleBlackMaskPosition.buf

[ResourceRemielleBlackMaskBlend]
type = Buffer
stride = 32
filename = RemielleBlackMaskBlend.buf

[ResourceRemielleBlackMaskTexcoord]
type = Buffer
stride = 20
filename = RemielleBlackMaskTexcoord.buf

[ResourceRemielleBlackMaskAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = RemielleBlackMaskA.ib

[ResourceRemielleBlackLegsnBackADiffuse]
filename = RemielleBlackLegsnBackADiffuse.dds

[ResourceRemielleBlackLegsnBackANormalMap]
filename = RemielleBlackLegsnBackANormalMap.dds

[ResourceRemielleBlackLegsnBackALightMap]
filename = RemielleBlackLegsnBackALightMap.dds

[ResourceRemielleBlackLegsnBackAMaterialMap]
filename = RemielleBlackLegsnBackAMaterialMap.dds

[ResourceRemielleBlackWingsADiffuse]
filename = RemielleBlackWingsADiffuse.dds

[ResourceRemielleBlackWingsANormalMap]
filename = RemielleBlackWingsANormalMap.dds

[ResourceRemielleBlackWingsAWEngineFX]
filename = RemielleBlackWingsAWEngineFX.dds

[ResourceRemielleBlackHairADiffuse]
filename = RemielleBlackHairADiffuse.dds

[ResourceRemielleBlackBodyADiffuse]
filename = RemielleBlackBodyADiffuse.dds

[ResourceRemielleBlackBodyANormalMap]
filename = RemielleBlackBodyANormalMap.dds

[ResourceRemielleBlackBodyALightMap]
filename = RemielleBlackBodyALightMap.dds

[ResourceRemielleBlackBodyAMaterialMap]
filename = RemielleBlackBodyAMaterialMap.dds

[ResourceRemielleBlackMaskADiffuse]
filename = RemielleBlackMaskADiffuse.dds

[ResourceRemielleBlackMaskANormalMap]
filename = RemielleBlackMaskANormalMap.dds

[ResourceRemielleBlackMaskALightMap]
filename = RemielleBlackMaskALightMap.dds

[ResourceRemielleBlackMaskAMaterialMap]
filename = RemielleBlackMaskAMaterialMap.dds

[ResourceCreditInfo]
type = Buffer
data = "Created by www.patreon.com/lewd_lad || https://lewdlad.fanbox.cc/"
; ════════════════════════════════════════════════════════
; RESIZE SK SYSTEM (LLMenuEXT) — Sparse Delta
; Shader: Resources/ResizeSystem/LLMEXT_RESIZE.hlsl
; EGS-safe deferred init via $init_frame
; ════════════════════════════════════════════════════════

; --- Present hook ---
; Called from game template [Present] as: run = CommandListResizePresent

[CommandListResizePresent]
;EGS калл вонючий — do not touch position resources until a few frames after load
local $resize_changed = 0

; Deferred init: count frames until ready (not first frame — EGS)
if $ll_resize_ready != 1
	$init_frame = $init_frame + 1
endif
if $init_frame > 3 && $ll_resize_ready != 1
	$ll_resize_ready = 1
	; Force one CS pass so persist $Resize_* apply immediately (F10 / rejoin)
	; without requiring the user to move a slider.
	$resize_changed = 1
endif

; After init is done, keep $init_frame cleared (steady state)
if $ll_resize_ready == 1
	$init_frame = 0
endif

; Slider change detection (only meaningful once ready; still cheap before)
if $Resize_0 != $Resize_0_Past
	$resize_changed = 1
	$Resize_0_Past = $Resize_0
endif
if $Resize_1 != $Resize_1_Past
	$resize_changed = 1
	$Resize_1_Past = $Resize_1
endif
if $Resize_2 != $Resize_2_Past
	$resize_changed = 1
	$Resize_2_Past = $Resize_2
endif
if $Resize_3 != $Resize_3_Past
	$resize_changed = 1
	$Resize_3_Past = $Resize_3
endif
if $Resize_4 != $Resize_4_Past
	$resize_changed = 1
	$Resize_4_Past = $Resize_4
endif
if $Resize_5 != $Resize_5_Past
	$resize_changed = 1
	$Resize_5_Past = $Resize_5
endif

; Gate: never copy/ref position resources until $ll_resize_ready
if $ll_resize_ready == 1
	if $resize_changed
		run = CustomShaderComputeShapes_Resize
	endif
endif

post $resize_changed = 0

; --- CS Dispatcher ---

[CustomShaderComputeShapes_Resize]
run = CustomShaderComputeShapes_Resize_RemielleBlackLegsnBack
run = CustomShaderComputeShapes_Resize_RemielleBlackWings
run = CustomShaderComputeShapes_Resize_RemielleBlackHair
run = CustomShaderComputeShapes_Resize_RemielleBlackBody
run = CustomShaderComputeShapes_Resize_RemielleBlackMask

; --- Per-component CS sections ---

[CustomShaderComputeShapes_Resize_RemielleBlackLegsnBack]
cs = Resources/ResizeSystem/LLMEXT_RESIZE.hlsl
cs-u5 = copy ResourceRemielleBlackLegsnBackPosition_Base
x115 = 56694

x88 = $Resize_0
y88 = -1
cs-t51 = copy ResourceRemielleBlackLegsnBackPosition_Cluster0
ResourceRemielleBlackLegsnBackPosition = ref cs-u5
Dispatch = (56694 + 1023) // 1024, 1, 1
x88 = $Resize_1
y88 = -1
cs-t51 = copy ResourceRemielleBlackLegsnBackPosition_Cluster1
ResourceRemielleBlackLegsnBackPosition = ref cs-u5
Dispatch = (56694 + 1023) // 1024, 1, 1
x88 = $Resize_2
y88 = -1
cs-t51 = copy ResourceRemielleBlackLegsnBackPosition_Cluster2
ResourceRemielleBlackLegsnBackPosition = ref cs-u5
Dispatch = (56694 + 1023) // 1024, 1, 1
x88 = $Resize_3
y88 = -1
cs-t51 = copy ResourceRemielleBlackLegsnBackPosition_Cluster3
ResourceRemielleBlackLegsnBackPosition = ref cs-u5
Dispatch = (56694 + 1023) // 1024, 1, 1
x88 = $Resize_4
y88 = -1
cs-t51 = copy ResourceRemielleBlackLegsnBackPosition_Cluster4
ResourceRemielleBlackLegsnBackPosition = ref cs-u5
Dispatch = (56694 + 1023) // 1024, 1, 1
x88 = $Resize_5
y88 = -1
cs-t51 = copy ResourceRemielleBlackLegsnBackPosition_Cluster5
ResourceRemielleBlackLegsnBackPosition = ref cs-u5
Dispatch = (56694 + 1023) // 1024, 1, 1

cs-u5 = null
cs-t51 = null

[CustomShaderComputeShapes_Resize_RemielleBlackWings]
cs = Resources/ResizeSystem/LLMEXT_RESIZE.hlsl
cs-u5 = copy ResourceRemielleBlackWingsPosition_Base
x115 = 5404

x88 = $Resize_0
y88 = -1
cs-t51 = copy ResourceRemielleBlackWingsPosition_Cluster0
ResourceRemielleBlackWingsPosition = ref cs-u5
Dispatch = (5404 + 1023) // 1024, 1, 1
x88 = $Resize_1
y88 = -1
cs-t51 = copy ResourceRemielleBlackWingsPosition_Cluster1
ResourceRemielleBlackWingsPosition = ref cs-u5
Dispatch = (5404 + 1023) // 1024, 1, 1
x88 = $Resize_2
y88 = -1
cs-t51 = copy ResourceRemielleBlackWingsPosition_Cluster2
ResourceRemielleBlackWingsPosition = ref cs-u5
Dispatch = (5404 + 1023) // 1024, 1, 1
x88 = $Resize_3
y88 = -1
cs-t51 = copy ResourceRemielleBlackWingsPosition_Cluster3
ResourceRemielleBlackWingsPosition = ref cs-u5
Dispatch = (5404 + 1023) // 1024, 1, 1
x88 = $Resize_4
y88 = -1
cs-t51 = copy ResourceRemielleBlackWingsPosition_Cluster4
ResourceRemielleBlackWingsPosition = ref cs-u5
Dispatch = (5404 + 1023) // 1024, 1, 1
x88 = $Resize_5
y88 = -1
cs-t51 = copy ResourceRemielleBlackWingsPosition_Cluster5
ResourceRemielleBlackWingsPosition = ref cs-u5
Dispatch = (5404 + 1023) // 1024, 1, 1

cs-u5 = null
cs-t51 = null

[CustomShaderComputeShapes_Resize_RemielleBlackHair]
cs = Resources/ResizeSystem/LLMEXT_RESIZE.hlsl
cs-u5 = copy ResourceRemielleBlackHairPosition_Base
x115 = 7310

x88 = $Resize_0
y88 = -1
cs-t51 = copy ResourceRemielleBlackHairPosition_Cluster0
ResourceRemielleBlackHairPosition = ref cs-u5
Dispatch = (7310 + 1023) // 1024, 1, 1
x88 = $Resize_1
y88 = -1
cs-t51 = copy ResourceRemielleBlackHairPosition_Cluster1
ResourceRemielleBlackHairPosition = ref cs-u5
Dispatch = (7310 + 1023) // 1024, 1, 1
x88 = $Resize_2
y88 = -1
cs-t51 = copy ResourceRemielleBlackHairPosition_Cluster2
ResourceRemielleBlackHairPosition = ref cs-u5
Dispatch = (7310 + 1023) // 1024, 1, 1
x88 = $Resize_3
y88 = -1
cs-t51 = copy ResourceRemielleBlackHairPosition_Cluster3
ResourceRemielleBlackHairPosition = ref cs-u5
Dispatch = (7310 + 1023) // 1024, 1, 1
x88 = $Resize_4
y88 = -1
cs-t51 = copy ResourceRemielleBlackHairPosition_Cluster4
ResourceRemielleBlackHairPosition = ref cs-u5
Dispatch = (7310 + 1023) // 1024, 1, 1
x88 = $Resize_5
y88 = -1
cs-t51 = copy ResourceRemielleBlackHairPosition_Cluster5
ResourceRemielleBlackHairPosition = ref cs-u5
Dispatch = (7310 + 1023) // 1024, 1, 1

cs-u5 = null
cs-t51 = null

[CustomShaderComputeShapes_Resize_RemielleBlackBody]
cs = Resources/ResizeSystem/LLMEXT_RESIZE.hlsl
cs-u5 = copy ResourceRemielleBlackBodyPosition_Base
x115 = 69443

x88 = $Resize_0
y88 = -1
cs-t51 = copy ResourceRemielleBlackBodyPosition_Cluster0
ResourceRemielleBlackBodyPosition = ref cs-u5
Dispatch = (69443 + 1023) // 1024, 1, 1
x88 = $Resize_1
y88 = -1
cs-t51 = copy ResourceRemielleBlackBodyPosition_Cluster1
ResourceRemielleBlackBodyPosition = ref cs-u5
Dispatch = (69443 + 1023) // 1024, 1, 1
x88 = $Resize_2
y88 = -1
cs-t51 = copy ResourceRemielleBlackBodyPosition_Cluster2
ResourceRemielleBlackBodyPosition = ref cs-u5
Dispatch = (69443 + 1023) // 1024, 1, 1
x88 = $Resize_3
y88 = -1
cs-t51 = copy ResourceRemielleBlackBodyPosition_Cluster3
ResourceRemielleBlackBodyPosition = ref cs-u5
Dispatch = (69443 + 1023) // 1024, 1, 1
x88 = $Resize_4
y88 = -1
cs-t51 = copy ResourceRemielleBlackBodyPosition_Cluster4
ResourceRemielleBlackBodyPosition = ref cs-u5
Dispatch = (69443 + 1023) // 1024, 1, 1
x88 = $Resize_5
y88 = -1
cs-t51 = copy ResourceRemielleBlackBodyPosition_Cluster5
ResourceRemielleBlackBodyPosition = ref cs-u5
Dispatch = (69443 + 1023) // 1024, 1, 1

cs-u5 = null
cs-t51 = null

[CustomShaderComputeShapes_Resize_RemielleBlackMask]
cs = Resources/ResizeSystem/LLMEXT_RESIZE.hlsl
cs-u5 = copy ResourceRemielleBlackMaskPosition_Base
x115 = 320

x88 = $Resize_0
y88 = -1
cs-t51 = copy ResourceRemielleBlackMaskPosition_Cluster0
ResourceRemielleBlackMaskPosition = ref cs-u5
Dispatch = (320 + 1023) // 1024, 1, 1
x88 = $Resize_1
y88 = -1
cs-t51 = copy ResourceRemielleBlackMaskPosition_Cluster1
ResourceRemielleBlackMaskPosition = ref cs-u5
Dispatch = (320 + 1023) // 1024, 1, 1
x88 = $Resize_2
y88 = -1
cs-t51 = copy ResourceRemielleBlackMaskPosition_Cluster2
ResourceRemielleBlackMaskPosition = ref cs-u5
Dispatch = (320 + 1023) // 1024, 1, 1
x88 = $Resize_3
y88 = -1
cs-t51 = copy ResourceRemielleBlackMaskPosition_Cluster3
ResourceRemielleBlackMaskPosition = ref cs-u5
Dispatch = (320 + 1023) // 1024, 1, 1
x88 = $Resize_4
y88 = -1
cs-t51 = copy ResourceRemielleBlackMaskPosition_Cluster4
ResourceRemielleBlackMaskPosition = ref cs-u5
Dispatch = (320 + 1023) // 1024, 1, 1
x88 = $Resize_5
y88 = -1
cs-t51 = copy ResourceRemielleBlackMaskPosition_Cluster5
ResourceRemielleBlackMaskPosition = ref cs-u5
Dispatch = (320 + 1023) // 1024, 1, 1

cs-u5 = null
cs-t51 = null

; --- Resources ---

; Base (frozen snapshot — prevents race condition)

[ResourceRemielleBlackLegsnBackPosition_Base]
type = Buffer
stride = 40
filename = RemielleBlackLegsnBackPosition.buf

[ResourceRemielleBlackLegsnBackPosition_Cluster0]
type = Buffer
stride = 40
filename = Resources/ResizeSystem/LegsnBackResizeBufCluster0.buf

[ResourceRemielleBlackLegsnBackPosition_Cluster1]
type = Buffer
stride = 40
filename = Resources/ResizeSystem/LegsnBackResizeBufCluster1.buf

[ResourceRemielleBlackLegsnBackPosition_Cluster2]
type = Buffer
stride = 40
filename = Resources/ResizeSystem/LegsnBackResizeBufCluster2.buf

[ResourceRemielleBlackLegsnBackPosition_Cluster3]
type = Buffer
stride = 40
filename = Resources/ResizeSystem/LegsnBackResizeBufCluster3.buf

[ResourceRemielleBlackLegsnBackPosition_Cluster4]
type = Buffer
stride = 40
filename = Resources/ResizeSystem/LegsnBackResizeBufCluster4.buf

[ResourceRemielleBlackLegsnBackPosition_Cluster5]
type = Buffer
stride = 40
filename = Resources/ResizeSystem/LegsnBackResizeBufCluster5.buf

; Base (frozen snapshot — prevents race condition)

[ResourceRemielleBlackWingsPosition_Base]
type = Buffer
stride = 40
filename = RemielleBlackWingsPosition.buf

[ResourceRemielleBlackWingsPosition_Cluster0]
type = Buffer
stride = 40
filename = Resources/ResizeSystem/WingsResizeBufCluster0.buf

[ResourceRemielleBlackWingsPosition_Cluster1]
type = Buffer
stride = 40
filename = Resources/ResizeSystem/WingsResizeBufCluster1.buf

[ResourceRemielleBlackWingsPosition_Cluster2]
type = Buffer
stride = 40
filename = Resources/ResizeSystem/WingsResizeBufCluster2.buf

[ResourceRemielleBlackWingsPosition_Cluster3]
type = Buffer
stride = 40
filename = Resources/ResizeSystem/WingsResizeBufCluster3.buf

[ResourceRemielleBlackWingsPosition_Cluster4]
type = Buffer
stride = 40
filename = Resources/ResizeSystem/WingsResizeBufCluster4.buf

[ResourceRemielleBlackWingsPosition_Cluster5]
type = Buffer
stride = 40
filename = Resources/ResizeSystem/WingsResizeBufCluster5.buf

; Base (frozen snapshot — prevents race condition)

[ResourceRemielleBlackHairPosition_Base]
type = Buffer
stride = 40
filename = RemielleBlackHairPosition.buf

[ResourceRemielleBlackHairPosition_Cluster0]
type = Buffer
stride = 40
filename = Resources/ResizeSystem/HairResizeBufCluster0.buf

[ResourceRemielleBlackHairPosition_Cluster1]
type = Buffer
stride = 40
filename = Resources/ResizeSystem/HairResizeBufCluster1.buf

[ResourceRemielleBlackHairPosition_Cluster2]
type = Buffer
stride = 40
filename = Resources/ResizeSystem/HairResizeBufCluster2.buf

[ResourceRemielleBlackHairPosition_Cluster3]
type = Buffer
stride = 40
filename = Resources/ResizeSystem/HairResizeBufCluster3.buf

[ResourceRemielleBlackHairPosition_Cluster4]
type = Buffer
stride = 40
filename = Resources/ResizeSystem/HairResizeBufCluster4.buf

[ResourceRemielleBlackHairPosition_Cluster5]
type = Buffer
stride = 40
filename = Resources/ResizeSystem/HairResizeBufCluster5.buf

; Base (frozen snapshot — prevents race condition)

[ResourceRemielleBlackBodyPosition_Base]
type = Buffer
stride = 40
filename = RemielleBlackBodyPosition.buf

[ResourceRemielleBlackBodyPosition_Cluster0]
type = Buffer
stride = 40
filename = Resources/ResizeSystem/BodyResizeBufCluster0.buf

[ResourceRemielleBlackBodyPosition_Cluster1]
type = Buffer
stride = 40
filename = Resources/ResizeSystem/BodyResizeBufCluster1.buf

[ResourceRemielleBlackBodyPosition_Cluster2]
type = Buffer
stride = 40
filename = Resources/ResizeSystem/BodyResizeBufCluster2.buf

[ResourceRemielleBlackBodyPosition_Cluster3]
type = Buffer
stride = 40
filename = Resources/ResizeSystem/BodyResizeBufCluster3.buf

[ResourceRemielleBlackBodyPosition_Cluster4]
type = Buffer
stride = 40
filename = Resources/ResizeSystem/BodyResizeBufCluster4.buf

[ResourceRemielleBlackBodyPosition_Cluster5]
type = Buffer
stride = 40
filename = Resources/ResizeSystem/BodyResizeBufCluster5.buf

; Base (frozen snapshot — prevents race condition)

[ResourceRemielleBlackMaskPosition_Base]
type = Buffer
stride = 40
filename = RemielleBlackMaskPosition.buf

[ResourceRemielleBlackMaskPosition_Cluster0]
type = Buffer
stride = 40
filename = Resources/ResizeSystem/MaskResizeBufCluster0.buf

[ResourceRemielleBlackMaskPosition_Cluster1]
type = Buffer
stride = 40
filename = Resources/ResizeSystem/MaskResizeBufCluster1.buf

[ResourceRemielleBlackMaskPosition_Cluster2]
type = Buffer
stride = 40
filename = Resources/ResizeSystem/MaskResizeBufCluster2.buf

[ResourceRemielleBlackMaskPosition_Cluster3]
type = Buffer
stride = 40
filename = Resources/ResizeSystem/MaskResizeBufCluster3.buf

[ResourceRemielleBlackMaskPosition_Cluster4]
type = Buffer
stride = 40
filename = Resources/ResizeSystem/MaskResizeBufCluster4.buf

[ResourceRemielleBlackMaskPosition_Cluster5]
type = Buffer
stride = 40
filename = Resources/ResizeSystem/MaskResizeBufCluster5.buf
    
; ============================================================
; INTERACTION MODULES (IM) — Detect + Jiggle
; Port of RZMenu Object Detect / Jiggle (see Velina.ini production).
; ============================================================

[ResourceLLDetectID]
type = RWBuffer
format = R32G32B32A32_FLOAT
array = 15

; R32_FLOAT single slot — pin_detected writes index 0; store uses offset 0

[ResourceLLPinnedDetectID]
type = RWBuffer
format = R32_FLOAT
array = 1

[ResourceLLPinnedDetectInfo]
type = RWBuffer
format = R32G32B32A32_FLOAT
array = 15

[ResourceLLJiggleScreenState]
type = RWBuffer
format = R32G32B32A32_FLOAT
array = 15

; Path Slide progress per zone (0..1). Plain persistent RWBuffer, written by
; rzm_jiggle_screen_state.hlsl, read by rzm_jiggle_interaction.hlsl -- see
; ZoneIsPathSlide/PathProgressState in both files.

[ResourceLLPathProgressState]
type = RWBuffer
format = R32_FLOAT
array = 12

; Path Slide start->end offset vectors, one per zone slot, baked from each
; zone's '<Zone Name>.path' Curve at export time (core/path_export.py).
; .xyz = local-space slide vector, .w = 1.0 if valid, else 0.0.

[ResourceLLPathVectors]
type = Buffer
format = R32G32B32A32_FLOAT
filename = Resources/IM/PathVectors.buf

; Swing pivot + two swing axes, one per zone slot, baked at export time from
; MESH VERTICES -- never from an object transform (core/swing_export.py).
; Pivots.xyz = median of the zone's '.Pivot' vertex group, .w = 1.0 if valid.
; AxisX = the direction the tip travels (from the zone's Swing Axis setting,
; projected perpendicular to the derived rest direction); AxisY completes the
; frame such that cross(AxisX, AxisY) IS that rest direction, which is what
; rzm_jiggle_interaction.hlsl reconstructs. 1-axis collapses the drag onto
; AxisX; 2-axis lets it aim freely in the AxisX/AxisY plane.

[ResourceLLSwingPivots]
type = Buffer
format = R32G32B32A32_FLOAT
filename = Resources/IM/SwingPivots.buf

[ResourceLLSwingAxisX]
type = Buffer
format = R32G32B32A32_FLOAT
filename = Resources/IM/SwingAxisX.buf

[ResourceLLSwingAxisY]
type = Buffer
format = R32G32B32A32_FLOAT
filename = Resources/IM/SwingAxisY.buf

; Where the GRABBED VERTEX actually ended up this frame. [0].xyz = its final
; local-space displacement, [0].w = 1 when valid. [1] = (latched vertex index,
; latched flag) -- the grabbed vertex is pinned for the whole hold, because the
; pinned detect info is rebuilt every frame and zeroed on a miss, so re-reading
; it would stop the report the instant the cursor left the COLLISION mesh.
;
; Written by the one jiggle thread whose vertex index matches the captured hit
; (rzm_jiggle_interaction.hlsl), read by the hand at Present
; (rzm_jiggle_cursor_preview.hlsl). This exists because the hand pass used to
; RECONSTRUCT the swing rotation from the pivot and axis buffers, and that
; reconstruction was wrong twice in a row in ways that were invisible on
; inspection -- the two copies of the maths agreed line for line and still
; disagreed on screen. Reporting the answer instead of re-deriving it cannot
; drift: it is the same number the vertex was moved by, including mask, axis
; select and everything else the physics applies.
;
; The physics is NOT changed by this -- the write only copies an already
; computed value out.

[ResourceLLSwingGrabDelta]
type = RWBuffer
format = R32G32B32A32_FLOAT
array = 2

; Transient visual-only state. Never read by jiggle physics.
; Slot 4 is the cursor preview shader's PRIVATE hysteresis state (hover hold
; frames remaining) -- no other pass reads or writes it. See HAND_HOLD_FRAMES
; in rzm_jiggle_cursor_preview.hlsl; shrinking this array back to 4 silently
; reinstates the single-frame hand flicker.

[ResourceLLJiggleCursorPreview]
type = RWBuffer
format = R32G32B32A32_FLOAT
array = 5

; UI placement record consumed by the standalone ViewportFrameAPI decoder.

[ResourceLLViewportLayoutData]
type = Texture2D
mode = mono
width = 8
height = 1
mips = 1
array = 1
msaa = 1
msaa_quality = 0
format = DXGI_FORMAT_R32G32B32A32_FLOAT
bind_flags = render_target shader_resource

[ResourceLLViewportFrameAPI]
type = RWBuffer
; Scalar layout lets the throttled 3DMigoto store read each value directly;
; no additional GPU resource copy is needed to unpack float4 records.
format = R32_FLOAT
array = 16

; SRV-compatible snapshot of the character target.  It is refreshed once per
; throttled probe generation, never per part or per frame.

[ResourceLLViewportSource]
; Dynamic candidates from the current UI draw.  They are refs only, captured
; on demand while the low-frequency probe is armed; no texture is copied.

[ResourceLLViewportCandidate0]

[ResourceLLViewportCandidate1]

[ResourceLLViewportCandidate2]

[ResourceLLViewportCandidate3]

[ResourceLLViewportCandidate4]

[ResourceLLViewportCandidate5]

[ResourceLLViewportCandidate6]

[ResourceLLViewportCandidate7]

[ResourceLLViewportCandidate8]

[ResourceLLViewportCandidate9]

[ResourceLLViewportCandidate10]

[ResourceLLViewportCandidate11]

[ResourceLLViewportCandidate12]

[ResourceLLViewportCandidate13]

[ResourceLLViewportCandidate14]

[ResourceLLViewportCandidate15]

[ResourceLLViewportLayoutT0]

[ResourceLLHandActionVB]
type = Buffer
stride = 28
filename = Resources/IM/HandAction.buf

[ResourceLLHandActionIB]
type = Buffer
format = R32_UINT
filename = Resources/IM/HandAction.ib

[ResourceLLHandNoActionVB]
type = Buffer
stride = 28
filename = Resources/IM/HandNoAction.buf

[ResourceLLHandNoActionIB]
type = Buffer
format = R32_UINT
filename = Resources/IM/HandNoAction.ib

; Baked smooth per-vertex normal, index-aligned with the position buffer
; above -- see rzm_jiggle_hand.hlsl's SmoothNormal comment for why this
; exists separately instead of a normal attribute on vb0.

[ResourceLLHandActionNormal]
type = Buffer
format = R32G32B32_FLOAT
filename = Resources/IM/HandAction_Normal.buf

[ResourceLLHandNoActionNormal]
type = Buffer
format = R32G32B32_FLOAT
filename = Resources/IM/HandNoAction_Normal.buf

; TTL-derived UI quad provider. Capture is throttled and observational: it
; cannot alter object detection until a later validator accepts this rect.

[ShaderOverrideLLViewportLayoutProbe]
hash = cdc90aee00e7900d
allow_duplicate_hash = true
if $ll_viewport_probe_armed_remielleblacklegsnback == 1
	post run = CustomShaderLLViewportLayoutProbe
endif

[CustomShaderLLViewportLayoutProbe]
ResourceLLViewportLayoutT0 = ref ps-t0
run = BuiltInCommandListUnbindAllRenderTargets
blend = ADD ONE ZERO
alpha = ADD ONE ZERO
vs = Resources/IM/rzm_viewport_layout_vs.hlsl
gs = Resources/IM/rzm_viewport_layout_probe.hlsl
ps = Resources/IM/rzm_viewport_layout_probe.hlsl
gs-t0 = ResourceLLViewportLayoutT0
ps-t0 = ResourceLLViewportLayoutT0
gs-t67 = ResourceLLViewportSource
ps-t67 = ResourceLLViewportSource
topology = triangle_list
o0 = set_viewport no_view_cache ResourceLLViewportLayoutData
x88 = $ll_viewport_probe_generation_remielleblacklegsnback
; The GS consumes only primitive 0 and 1.  Replaying the original UI batch
; (often 35k indices) therefore buys no information and is prohibitively
; expensive.  Preserve that batch's starting offsets, but submit just its
; first two triangles to the 8x1 diagnostic RT.
if draw_type == 2
	drawindexed = INDEX_COUNT, FIRST_INDEX, FIRST_VERTEX
elif draw_type == 4
	drawindexedinstanced = INDEX_COUNT, INSTANCE_COUNT, FIRST_INDEX, FIRST_VERTEX, FIRST_INSTANCE
else
	drawindexed = auto
endif

[CustomShaderLLViewportLayoutDecode]
cs = Resources/IM/rzm_viewport_layout_decode.hlsl
cs-t0 = ResourceLLViewportLayoutData
cs-u0 = ResourceLLViewportFrameAPI
x88 = $ll_viewport_probe_generation_remielleblacklegsnback
dispatch = 1, 1, 1
post cs-t0 = null
post cs-u0 = null

[ResourceLLBakeRT]
type = Texture2D
mode = mono
width = 8
height = 2
mips = 1
array = 1
msaa = 1
msaa_quality = 0
format = DXGI_FORMAT_R32G32B32A32_FLOAT
bind_flags = render_target shader_resource

[ResourceLLDetectRemielleBlackLegsnBackObjectMap]
type = Buffer
format = R32G32B32A32_FLOAT
filename = RemielleBlackLegsnBackObjectMap.buf

[ResourceLLJiggleMasks0_RemielleBlackLegsnBack]
type = Buffer
format = R32G32B32A32_FLOAT
filename = RemielleBlackLegsnBackJiggleMasks0.buf

[ResourceLLJiggleMasks1_RemielleBlackLegsnBack]
type = Buffer
format = R32G32B32A32_FLOAT
filename = RemielleBlackLegsnBackJiggleMasks1.buf

[ResourceLLJiggleMasks2_RemielleBlackLegsnBack]
type = Buffer
format = R32G32B32A32_FLOAT
filename = RemielleBlackLegsnBackJiggleMasks2.buf

[ResourceLLDebugDetect_RemielleBlackLegsnBack]
type = RWBuffer
format = R32G32B32A32_FLOAT
array = 23

[ResourceLLComponentDetect_RemielleBlackLegsnBack]
type = RWBuffer
format = R32G32B32A32_FLOAT
array = 15

[ResourceLLPinnedComponentID_RemielleBlackLegsnBack]
type = RWBuffer
format = R32_FLOAT
array = 1

[ResourceLLPinnedComponentInfo_RemielleBlackLegsnBack]
type = RWBuffer
format = R32G32B32A32_FLOAT
array = 15

[CustomShaderLLDetectRemielleBlackLegsnBack]
cs = Resources/IM/rzm_object_detect.hlsl
x28 = 0
cs-t0 = vb0
cs-t1 = ib
cs-t2 = ResourceLLDetectRemielleBlackLegsnBackObjectMap
cs-t3 = ResourceLLBakeRT
cs-t4 = ResourceLLJiggleMasks0_RemielleBlackLegsnBack
cs-t5 = ResourceLLJiggleMasks1_RemielleBlackLegsnBack
cs-t7 = ResourceLLJiggleMasks2_RemielleBlackLegsnBack
cs-t6 = ResourceLLViewportFrameAPI
cs-u0 = ResourceLLDetectID
cs-u1 = ResourceLLComponentDetect_RemielleBlackLegsnBack
cs-u2 = ResourceLLDebugDetect_RemielleBlackLegsnBack
x24 = $cursorX
y24 = $cursorY
z24 = $screenW
w24 = $screenH
x25 = $isMouseButtonDown
x26 = $ll_jiggle_component_anchor_px_remielleblacklegsnback
w26 = 8.0
x27 = $cursorX
y27 = $cursorY
z27 = res_width
w27 = res_height
x85 = $ll_viewport_offset_x
y85 = $ll_viewport_offset_y
z85 = $ll_viewport_scale_x
w85 = $ll_viewport_scale_y
x86 = $ll_viewport_valid
x74 = $ll_jiggle_debug_dump
dispatch = 1, 1, 1
; This is only the frame accumulator.  PinDetected consumes it later.
; Unbind the UAV before the following jiggle pass sets its shader resources.
cs-u0 = null
cs-u1 = null
cs-u2 = null

[CustomShaderLLBakeRemielleBlackLegsnBackA]
run = BuiltInCommandListUnbindAllRenderTargets
clear = ResourceLLBakeRT 0.0
run = CustomShaderLLBakeSample0_RemielleBlackLegsnBackA
run = CustomShaderLLBakeSample1_RemielleBlackLegsnBackA
run = CustomShaderLLBakeSample2_RemielleBlackLegsnBackA
run = CustomShaderLLBakeSample3_RemielleBlackLegsnBackA
run = CustomShaderLLBakeSample4_RemielleBlackLegsnBackA
run = CustomShaderLLBakeSample5_RemielleBlackLegsnBackA
run = CustomShaderLLBakeSample6_RemielleBlackLegsnBackA
run = CustomShaderLLBakeSample7_RemielleBlackLegsnBackA

[CustomShaderLLBakeSample0_RemielleBlackLegsnBackA]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackLegsnBackAIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 0
y26 = 0
drawindexed = 1, 0, 0

[CustomShaderLLBakeSample1_RemielleBlackLegsnBackA]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackLegsnBackAIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 1
y26 = 36853
drawindexed = 1, 36853, 0

[CustomShaderLLBakeSample2_RemielleBlackLegsnBackA]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackLegsnBackAIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 2
y26 = 73706
drawindexed = 1, 73706, 0

[CustomShaderLLBakeSample3_RemielleBlackLegsnBackA]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackLegsnBackAIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 3
y26 = 110559
drawindexed = 1, 110559, 0

[CustomShaderLLBakeSample4_RemielleBlackLegsnBackA]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackLegsnBackAIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 4
y26 = 147412
drawindexed = 1, 147412, 0

[CustomShaderLLBakeSample5_RemielleBlackLegsnBackA]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackLegsnBackAIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 5
y26 = 184265
drawindexed = 1, 184265, 0

[CustomShaderLLBakeSample6_RemielleBlackLegsnBackA]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackLegsnBackAIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 6
y26 = 221118
drawindexed = 1, 221118, 0

[CustomShaderLLBakeSample7_RemielleBlackLegsnBackA]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackLegsnBackAIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 7
y26 = 257971
drawindexed = 1, 257971, 0

[CustomShaderLLBakeRemielleBlackLegsnBackB]
run = BuiltInCommandListUnbindAllRenderTargets
clear = ResourceLLBakeRT 0.0
run = CustomShaderLLBakeSample0_RemielleBlackLegsnBackB
run = CustomShaderLLBakeSample1_RemielleBlackLegsnBackB
run = CustomShaderLLBakeSample2_RemielleBlackLegsnBackB
run = CustomShaderLLBakeSample3_RemielleBlackLegsnBackB
run = CustomShaderLLBakeSample4_RemielleBlackLegsnBackB
run = CustomShaderLLBakeSample5_RemielleBlackLegsnBackB
run = CustomShaderLLBakeSample6_RemielleBlackLegsnBackB
run = CustomShaderLLBakeSample7_RemielleBlackLegsnBackB

[CustomShaderLLBakeSample0_RemielleBlackLegsnBackB]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackLegsnBackBIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 0
y26 = 0
drawindexed = 1, 0, 0

[CustomShaderLLBakeSample1_RemielleBlackLegsnBackB]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackLegsnBackBIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 1
y26 = 14
drawindexed = 1, 14, 0

[CustomShaderLLBakeSample2_RemielleBlackLegsnBackB]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackLegsnBackBIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 2
y26 = 28
drawindexed = 1, 28, 0

[CustomShaderLLBakeSample3_RemielleBlackLegsnBackB]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackLegsnBackBIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 3
y26 = 42
drawindexed = 1, 42, 0

[CustomShaderLLBakeSample4_RemielleBlackLegsnBackB]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackLegsnBackBIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 4
y26 = 56
drawindexed = 1, 56, 0

[CustomShaderLLBakeSample5_RemielleBlackLegsnBackB]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackLegsnBackBIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 5
y26 = 70
drawindexed = 1, 70, 0

[CustomShaderLLBakeSample6_RemielleBlackLegsnBackB]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackLegsnBackBIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 6
y26 = 84
drawindexed = 1, 84, 0

[CustomShaderLLBakeSample7_RemielleBlackLegsnBackB]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackLegsnBackBIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 7
y26 = 98
drawindexed = 1, 98, 0

[ResourceLLJiggleState_RemielleBlackLegsnBack]
type = RWBuffer
format = R32G32B32A32_FLOAT
array = 10

[ResourceLLDebugJiggle_RemielleBlackLegsnBack]
type = RWBuffer
format = R32G32B32A32_FLOAT
array = 17

[ResourceLLDebugJiggleVertex_RemielleBlackLegsnBack]
type = RWBuffer
format = R32G32B32A32_FLOAT
array = 171612

[ResourceLLJiggleTempVB0_RemielleBlackLegsnBack]
type = RWBuffer

[ResourceLLJiggleParams_RemielleBlackLegsnBack]
type = Buffer
format = R32G32B32A32_FLOAT
array = 56
data = 0.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 4344.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 15948.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 25968.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 28008.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 28368.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 34704.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 46068.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 63648.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 77460.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 131592.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 185724.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 239856.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 0.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000
; RZM Jiggle Interaction — RemielleBlackLegsnBack
; Jiggle colliders: 14

[CustomShaderLLJiggleRemielleBlackLegsnBack]
local $CursorXPast
local $CursorYPast
local $WasMouseButtonDown
local $back_x69 = x69
local $back_y69 = y69
local $back_z69 = z69
local $back_w69 = w69

if $isMouseButtonDown == 1
	if $WasMouseButtonDown == 0
		$CursorXPast = $cursorX
		$CursorYPast = $cursorY
	endif
	$WasMouseButtonDown = 1
	w67 = 1
else
	$WasMouseButtonDown = 0
	$CursorXPast = 0
	$CursorYPast = 0
	w67 = 0
endif

cs = Resources/IM/rzm_jiggle_interaction.hlsl

x67 = $CursorXPast
y67 = $CursorYPast

; Canonical fallback profile: a global winner ID may belong to another VB0.
x68 = 0.25
y68 = 1.00
z68 = 1.50
w68 = 1.00

; Current cursor must be PIXEL space (see CommandListLLCursorUpdate)
x69 = $cursorX
y69 = $cursorY
z69 = $screenW
w69 = $screenH

x70 = 0.86
y70 = 0.176
z70 = 0.96
w70 = 0.055

x71 = 0.50
y71 = 1.10
z71 = 1.00
w71 = 0.12

; [72].x = number of jiggle collider entries in ResourceLLJiggleParams
x72 = 14
y72 = $ll_jiggle_mult_radius_remielleblacklegsnback
z72 = $ll_jiggle_mult_strength_remielleblacklegsnback
w72 = $ll_jiggle_mult_spring_remielleblacklegsnback
x73 = $ll_jiggle_mult_damping_remielleblacklegsnback
y73 = 1.00
x74 = $ll_jiggle_debug_dump
x75 = $ll_jiggle_vertex_debug_dump
x76 = $ll_jiggle_delta_time_remielleblacklegsnback
y76 = $ll_jiggle_sim_speed_remielleblacklegsnback
z76 = $ll_jiggle_max_step_remielleblacklegsnback
x77 = $ll_jiggle_radius_slot_0_remielleblacklegsnback
y77 = $ll_jiggle_radius_slot_1_remielleblacklegsnback
z77 = $ll_jiggle_radius_slot_2_remielleblacklegsnback
w77 = $ll_jiggle_radius_slot_3_remielleblacklegsnback
x78 = $ll_jiggle_radius_slot_4_remielleblacklegsnback
y78 = $ll_jiggle_radius_slot_5_remielleblacklegsnback
z78 = $ll_jiggle_radius_slot_6_remielleblacklegsnback
w78 = $ll_jiggle_radius_slot_7_remielleblacklegsnback
x79 = $ll_jiggle_strength_slot_0_remielleblacklegsnback
y79 = $ll_jiggle_strength_slot_1_remielleblacklegsnback
z79 = $ll_jiggle_strength_slot_2_remielleblacklegsnback
w79 = $ll_jiggle_strength_slot_3_remielleblacklegsnback
x80 = $ll_jiggle_strength_slot_4_remielleblacklegsnback
y80 = $ll_jiggle_strength_slot_5_remielleblacklegsnback
z80 = $ll_jiggle_strength_slot_6_remielleblacklegsnback
w80 = $ll_jiggle_strength_slot_7_remielleblacklegsnback
x81 = $ll_jiggle_max_offset_slot_0_remielleblacklegsnback
y81 = $ll_jiggle_max_offset_slot_1_remielleblacklegsnback
z81 = $ll_jiggle_max_offset_slot_2_remielleblacklegsnback
w81 = $ll_jiggle_max_offset_slot_3_remielleblacklegsnback
x82 = $ll_jiggle_max_offset_slot_4_remielleblacklegsnback
y82 = $ll_jiggle_max_offset_slot_5_remielleblacklegsnback
z82 = $ll_jiggle_max_offset_slot_6_remielleblacklegsnback
w82 = $ll_jiggle_max_offset_slot_7_remielleblacklegsnback
x99 = $ll_jiggle_grabbable_slot_0_remielleblacklegsnback
y99 = $ll_jiggle_grabbable_slot_1_remielleblacklegsnback
z99 = $ll_jiggle_grabbable_slot_2_remielleblacklegsnback
w99 = $ll_jiggle_grabbable_slot_3_remielleblacklegsnback
x100 = $ll_jiggle_grabbable_slot_4_remielleblacklegsnback
y100 = $ll_jiggle_grabbable_slot_5_remielleblacklegsnback
z100 = $ll_jiggle_grabbable_slot_6_remielleblacklegsnback
w100 = $ll_jiggle_grabbable_slot_7_remielleblacklegsnback
x101 = $ll_jiggle_falloff_slot_0_remielleblacklegsnback
y101 = $ll_jiggle_falloff_slot_1_remielleblacklegsnback
z101 = $ll_jiggle_falloff_slot_2_remielleblacklegsnback
w101 = $ll_jiggle_falloff_slot_3_remielleblacklegsnback
x102 = $ll_jiggle_falloff_slot_4_remielleblacklegsnback
y102 = $ll_jiggle_falloff_slot_5_remielleblacklegsnback
z102 = $ll_jiggle_falloff_slot_6_remielleblacklegsnback
w102 = $ll_jiggle_falloff_slot_7_remielleblacklegsnback
x119 = $ll_jiggle_path_mode_slot_0_remielleblacklegsnback
y119 = $ll_jiggle_path_mode_slot_1_remielleblacklegsnback
z119 = $ll_jiggle_path_mode_slot_2_remielleblacklegsnback
w119 = $ll_jiggle_path_mode_slot_3_remielleblacklegsnback
x120 = $ll_jiggle_path_mode_slot_4_remielleblacklegsnback
y120 = $ll_jiggle_path_mode_slot_5_remielleblacklegsnback
z120 = $ll_jiggle_path_mode_slot_6_remielleblacklegsnback
w120 = $ll_jiggle_path_mode_slot_7_remielleblacklegsnback
; Zones 8-11. Registers 103/106/109/112/116/121 (115 belongs to an
; unrelated resize-shapekeys feature -- see LLMEXT_RESIZE.hlsl ORIG_V_COUNT).
x103 = $ll_jiggle_radius_slot_8_remielleblacklegsnback
y103 = $ll_jiggle_radius_slot_9_remielleblacklegsnback
z103 = $ll_jiggle_radius_slot_10_remielleblacklegsnback
w103 = $ll_jiggle_radius_slot_11_remielleblacklegsnback
x106 = $ll_jiggle_strength_slot_8_remielleblacklegsnback
y106 = $ll_jiggle_strength_slot_9_remielleblacklegsnback
z106 = $ll_jiggle_strength_slot_10_remielleblacklegsnback
w106 = $ll_jiggle_strength_slot_11_remielleblacklegsnback
x109 = $ll_jiggle_max_offset_slot_8_remielleblacklegsnback
y109 = $ll_jiggle_max_offset_slot_9_remielleblacklegsnback
z109 = $ll_jiggle_max_offset_slot_10_remielleblacklegsnback
w109 = $ll_jiggle_max_offset_slot_11_remielleblacklegsnback
x112 = $ll_jiggle_grabbable_slot_8_remielleblacklegsnback
y112 = $ll_jiggle_grabbable_slot_9_remielleblacklegsnback
z112 = $ll_jiggle_grabbable_slot_10_remielleblacklegsnback
w112 = $ll_jiggle_grabbable_slot_11_remielleblacklegsnback
x116 = $ll_jiggle_falloff_slot_8_remielleblacklegsnback
y116 = $ll_jiggle_falloff_slot_9_remielleblacklegsnback
z116 = $ll_jiggle_falloff_slot_10_remielleblacklegsnback
w116 = $ll_jiggle_falloff_slot_11_remielleblacklegsnback
x121 = $ll_jiggle_path_mode_slot_8_remielleblacklegsnback
y121 = $ll_jiggle_path_mode_slot_9_remielleblacklegsnback
z121 = $ll_jiggle_path_mode_slot_10_remielleblacklegsnback
w121 = $ll_jiggle_path_mode_slot_11_remielleblacklegsnback
x122 = $ll_jiggle_damping_slot_0_remielleblacklegsnback
y122 = $ll_jiggle_damping_slot_1_remielleblacklegsnback
z122 = $ll_jiggle_damping_slot_2_remielleblacklegsnback
w122 = $ll_jiggle_damping_slot_3_remielleblacklegsnback
x123 = $ll_jiggle_damping_slot_4_remielleblacklegsnback
y123 = $ll_jiggle_damping_slot_5_remielleblacklegsnback
z123 = $ll_jiggle_damping_slot_6_remielleblacklegsnback
w123 = $ll_jiggle_damping_slot_7_remielleblacklegsnback
x124 = $ll_jiggle_damping_slot_8_remielleblacklegsnback
y124 = $ll_jiggle_damping_slot_9_remielleblacklegsnback
z124 = $ll_jiggle_damping_slot_10_remielleblacklegsnback
w124 = $ll_jiggle_damping_slot_11_remielleblacklegsnback
x125 = $ll_jiggle_swing_mode_slot_0_remielleblacklegsnback
y125 = $ll_jiggle_swing_mode_slot_1_remielleblacklegsnback
z125 = $ll_jiggle_swing_mode_slot_2_remielleblacklegsnback
w125 = $ll_jiggle_swing_mode_slot_3_remielleblacklegsnback
x126 = $ll_jiggle_swing_mode_slot_4_remielleblacklegsnback
y126 = $ll_jiggle_swing_mode_slot_5_remielleblacklegsnback
z126 = $ll_jiggle_swing_mode_slot_6_remielleblacklegsnback
w126 = $ll_jiggle_swing_mode_slot_7_remielleblacklegsnback
x127 = $ll_jiggle_swing_mode_slot_8_remielleblacklegsnback
y127 = $ll_jiggle_swing_mode_slot_9_remielleblacklegsnback
z127 = $ll_jiggle_swing_mode_slot_10_remielleblacklegsnback
w127 = $ll_jiggle_swing_mode_slot_11_remielleblacklegsnback
x128 = $ll_jiggle_swing_min_a_slot_0_remielleblacklegsnback
y128 = $ll_jiggle_swing_min_a_slot_1_remielleblacklegsnback
z128 = $ll_jiggle_swing_min_a_slot_2_remielleblacklegsnback
w128 = $ll_jiggle_swing_min_a_slot_3_remielleblacklegsnback
x129 = $ll_jiggle_swing_min_a_slot_4_remielleblacklegsnback
y129 = $ll_jiggle_swing_min_a_slot_5_remielleblacklegsnback
z129 = $ll_jiggle_swing_min_a_slot_6_remielleblacklegsnback
w129 = $ll_jiggle_swing_min_a_slot_7_remielleblacklegsnback
x130 = $ll_jiggle_swing_min_a_slot_8_remielleblacklegsnback
y130 = $ll_jiggle_swing_min_a_slot_9_remielleblacklegsnback
z130 = $ll_jiggle_swing_min_a_slot_10_remielleblacklegsnback
w130 = $ll_jiggle_swing_min_a_slot_11_remielleblacklegsnback
x134 = $ll_jiggle_swing_max_a_slot_0_remielleblacklegsnback
y134 = $ll_jiggle_swing_max_a_slot_1_remielleblacklegsnback
z134 = $ll_jiggle_swing_max_a_slot_2_remielleblacklegsnback
w134 = $ll_jiggle_swing_max_a_slot_3_remielleblacklegsnback
x135 = $ll_jiggle_swing_max_a_slot_4_remielleblacklegsnback
y135 = $ll_jiggle_swing_max_a_slot_5_remielleblacklegsnback
z135 = $ll_jiggle_swing_max_a_slot_6_remielleblacklegsnback
w135 = $ll_jiggle_swing_max_a_slot_7_remielleblacklegsnback
x136 = $ll_jiggle_swing_max_a_slot_8_remielleblacklegsnback
y136 = $ll_jiggle_swing_max_a_slot_9_remielleblacklegsnback
z136 = $ll_jiggle_swing_max_a_slot_10_remielleblacklegsnback
w136 = $ll_jiggle_swing_max_a_slot_11_remielleblacklegsnback
x137 = $ll_jiggle_swing_min_b_slot_0_remielleblacklegsnback
y137 = $ll_jiggle_swing_min_b_slot_1_remielleblacklegsnback
z137 = $ll_jiggle_swing_min_b_slot_2_remielleblacklegsnback
w137 = $ll_jiggle_swing_min_b_slot_3_remielleblacklegsnback
x138 = $ll_jiggle_swing_min_b_slot_4_remielleblacklegsnback
y138 = $ll_jiggle_swing_min_b_slot_5_remielleblacklegsnback
z138 = $ll_jiggle_swing_min_b_slot_6_remielleblacklegsnback
w138 = $ll_jiggle_swing_min_b_slot_7_remielleblacklegsnback
x139 = $ll_jiggle_swing_min_b_slot_8_remielleblacklegsnback
y139 = $ll_jiggle_swing_min_b_slot_9_remielleblacklegsnback
z139 = $ll_jiggle_swing_min_b_slot_10_remielleblacklegsnback
w139 = $ll_jiggle_swing_min_b_slot_11_remielleblacklegsnback
x140 = $ll_jiggle_swing_max_b_slot_0_remielleblacklegsnback
y140 = $ll_jiggle_swing_max_b_slot_1_remielleblacklegsnback
z140 = $ll_jiggle_swing_max_b_slot_2_remielleblacklegsnback
w140 = $ll_jiggle_swing_max_b_slot_3_remielleblacklegsnback
x141 = $ll_jiggle_swing_max_b_slot_4_remielleblacklegsnback
y141 = $ll_jiggle_swing_max_b_slot_5_remielleblacklegsnback
z141 = $ll_jiggle_swing_max_b_slot_6_remielleblacklegsnback
w141 = $ll_jiggle_swing_max_b_slot_7_remielleblacklegsnback
x142 = $ll_jiggle_swing_max_b_slot_8_remielleblacklegsnback
y142 = $ll_jiggle_swing_max_b_slot_9_remielleblacklegsnback
z142 = $ll_jiggle_swing_max_b_slot_10_remielleblacklegsnback
w142 = $ll_jiggle_swing_max_b_slot_11_remielleblacklegsnback
x131 = $ll_jiggle_swing_axis_mode_slot_0_remielleblacklegsnback
y131 = $ll_jiggle_swing_axis_mode_slot_1_remielleblacklegsnback
z131 = $ll_jiggle_swing_axis_mode_slot_2_remielleblacklegsnback
w131 = $ll_jiggle_swing_axis_mode_slot_3_remielleblacklegsnback
x132 = $ll_jiggle_swing_axis_mode_slot_4_remielleblacklegsnback
y132 = $ll_jiggle_swing_axis_mode_slot_5_remielleblacklegsnback
z132 = $ll_jiggle_swing_axis_mode_slot_6_remielleblacklegsnback
w132 = $ll_jiggle_swing_axis_mode_slot_7_remielleblacklegsnback
x133 = $ll_jiggle_swing_axis_mode_slot_8_remielleblacklegsnback
y133 = $ll_jiggle_swing_axis_mode_slot_9_remielleblacklegsnback
z133 = $ll_jiggle_swing_axis_mode_slot_10_remielleblacklegsnback
w133 = $ll_jiggle_swing_axis_mode_slot_11_remielleblacklegsnback
; Live axis constraint (Shift/Ctrl). Written wherever the swing registers
; are, rather than relying on Present having run -- IniParams are global
; with no guaranteed ordering between dispatches.
x143 = $ll_jiggle_axis_select_remielleblacklegsnback

; Global frame-N winner, published by PinDetected after all component scans.
; Do not copy a per-component mid-frame snapshot here: it creates seams.
; The frame input is global, but hit/basis are local to this VB0.  Consume
; the component-local pinned anchor rather than the global winner.
cs-t67 = ResourceLLPinnedComponentInfo_RemielleBlackLegsnBack
cs-t68 = ResourceLLJiggleParams_RemielleBlackLegsnBack
cs-t65 = ResourceLLJiggleMasks0_RemielleBlackLegsnBack
cs-t66 = ResourceLLJiggleMasks1_RemielleBlackLegsnBack
cs-t69 = ResourceLLJiggleMasks2_RemielleBlackLegsnBack
cs-t71 = ResourceLLJiggleScreenState
cs-t73 = ResourceLLPathVectors
cs-t74 = ResourceLLPathProgressState
cs-t75 = ResourceLLSwingPivots
cs-t76 = ResourceLLSwingAxisX
cs-t77 = ResourceLLSwingAxisY

cs-u6 = ResourceLLJiggleState_RemielleBlackLegsnBack
cs-u7 = ResourceLLDebugJiggle_RemielleBlackLegsnBack
cs-u4 = ResourceLLDebugJiggleVertex_RemielleBlackLegsnBack
; Shared, not per-component: only the component holding the grabbed vertex
; writes it, so there is exactly one writer per frame.
cs-u3 = ResourceLLSwingGrabDelta

ResourceLLJiggleTempVB0_RemielleBlackLegsnBack = vb0
cs-t24 = vb0
cs-u5 = copy ResourceLLJiggleTempVB0_RemielleBlackLegsnBack

Dispatch = (57204 + 255) // 256, 1, 1

vb0 = null
ResourceLLJiggleTempVB0_RemielleBlackLegsnBack = copy cs-u5
; The copied output is now original-draw VB0, so it cannot remain a UAV.
cs-u5 = null
cs-u6 = null
cs-u7 = null
cs-u4 = null
cs-u3 = null
cs-t71 = null

post x69 = $back_x69
post y69 = $back_y69
post z69 = $back_z69
post w69 = $back_w69

[ResourceLLDetectRemielleBlackHairObjectMap]
type = Buffer
format = R32G32B32A32_FLOAT
filename = RemielleBlackHairObjectMap.buf

[ResourceLLJiggleMasks0_RemielleBlackHair]
type = Buffer
format = R32G32B32A32_FLOAT
filename = RemielleBlackHairJiggleMasks0.buf

[ResourceLLJiggleMasks1_RemielleBlackHair]
type = Buffer
format = R32G32B32A32_FLOAT
filename = RemielleBlackHairJiggleMasks1.buf

[ResourceLLJiggleMasks2_RemielleBlackHair]
type = Buffer
format = R32G32B32A32_FLOAT
filename = RemielleBlackHairJiggleMasks2.buf

[ResourceLLDebugDetect_RemielleBlackHair]
type = RWBuffer
format = R32G32B32A32_FLOAT
array = 23

[ResourceLLComponentDetect_RemielleBlackHair]
type = RWBuffer
format = R32G32B32A32_FLOAT
array = 15

[ResourceLLPinnedComponentID_RemielleBlackHair]
type = RWBuffer
format = R32_FLOAT
array = 1

[ResourceLLPinnedComponentInfo_RemielleBlackHair]
type = RWBuffer
format = R32G32B32A32_FLOAT
array = 15

[CustomShaderLLDetectRemielleBlackHair]
cs = Resources/IM/rzm_object_detect.hlsl
x28 = 0
cs-t0 = vb0
cs-t1 = ib
cs-t2 = ResourceLLDetectRemielleBlackHairObjectMap
cs-t3 = ResourceLLBakeRT
cs-t4 = ResourceLLJiggleMasks0_RemielleBlackHair
cs-t5 = ResourceLLJiggleMasks1_RemielleBlackHair
cs-t7 = ResourceLLJiggleMasks2_RemielleBlackHair
cs-t6 = ResourceLLViewportFrameAPI
cs-u0 = ResourceLLDetectID
cs-u1 = ResourceLLComponentDetect_RemielleBlackHair
cs-u2 = ResourceLLDebugDetect_RemielleBlackHair
x24 = $cursorX
y24 = $cursorY
z24 = $screenW
w24 = $screenH
x25 = $isMouseButtonDown
x26 = $ll_jiggle_component_anchor_px_remielleblacklegsnback
w26 = 8.0
x27 = $cursorX
y27 = $cursorY
z27 = res_width
w27 = res_height
x85 = $ll_viewport_offset_x
y85 = $ll_viewport_offset_y
z85 = $ll_viewport_scale_x
w85 = $ll_viewport_scale_y
x86 = $ll_viewport_valid
x74 = $ll_jiggle_debug_dump
dispatch = 1, 1, 1
; This is only the frame accumulator.  PinDetected consumes it later.
; Unbind the UAV before the following jiggle pass sets its shader resources.
cs-u0 = null
cs-u1 = null
cs-u2 = null

[CustomShaderLLBakeRemielleBlackHairA]
run = BuiltInCommandListUnbindAllRenderTargets
clear = ResourceLLBakeRT 0.0
run = CustomShaderLLBakeSample0_RemielleBlackHairA
run = CustomShaderLLBakeSample1_RemielleBlackHairA
run = CustomShaderLLBakeSample2_RemielleBlackHairA
run = CustomShaderLLBakeSample3_RemielleBlackHairA
run = CustomShaderLLBakeSample4_RemielleBlackHairA
run = CustomShaderLLBakeSample5_RemielleBlackHairA
run = CustomShaderLLBakeSample6_RemielleBlackHairA
run = CustomShaderLLBakeSample7_RemielleBlackHairA

[CustomShaderLLBakeSample0_RemielleBlackHairA]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackHairAIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 0
y26 = 0
drawindexed = 1, 0, 0

[CustomShaderLLBakeSample1_RemielleBlackHairA]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackHairAIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 1
y26 = 2073
drawindexed = 1, 2073, 0

[CustomShaderLLBakeSample2_RemielleBlackHairA]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackHairAIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 2
y26 = 4146
drawindexed = 1, 4146, 0

[CustomShaderLLBakeSample3_RemielleBlackHairA]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackHairAIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 3
y26 = 6219
drawindexed = 1, 6219, 0

[CustomShaderLLBakeSample4_RemielleBlackHairA]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackHairAIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 4
y26 = 8292
drawindexed = 1, 8292, 0

[CustomShaderLLBakeSample5_RemielleBlackHairA]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackHairAIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 5
y26 = 10365
drawindexed = 1, 10365, 0

[CustomShaderLLBakeSample6_RemielleBlackHairA]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackHairAIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 6
y26 = 12438
drawindexed = 1, 12438, 0

[CustomShaderLLBakeSample7_RemielleBlackHairA]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackHairAIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 7
y26 = 14511
drawindexed = 1, 14511, 0

[CustomShaderLLBakeRemielleBlackHairB]
run = BuiltInCommandListUnbindAllRenderTargets
clear = ResourceLLBakeRT 0.0
run = CustomShaderLLBakeSample0_RemielleBlackHairB
run = CustomShaderLLBakeSample1_RemielleBlackHairB
run = CustomShaderLLBakeSample2_RemielleBlackHairB
run = CustomShaderLLBakeSample3_RemielleBlackHairB
run = CustomShaderLLBakeSample4_RemielleBlackHairB
run = CustomShaderLLBakeSample5_RemielleBlackHairB
run = CustomShaderLLBakeSample6_RemielleBlackHairB
run = CustomShaderLLBakeSample7_RemielleBlackHairB

[CustomShaderLLBakeSample0_RemielleBlackHairB]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackHairBIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 0
y26 = 0
drawindexed = 1, 0, 0

[CustomShaderLLBakeSample1_RemielleBlackHairB]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackHairBIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 1
y26 = 1431
drawindexed = 1, 1431, 0

[CustomShaderLLBakeSample2_RemielleBlackHairB]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackHairBIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 2
y26 = 2862
drawindexed = 1, 2862, 0

[CustomShaderLLBakeSample3_RemielleBlackHairB]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackHairBIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 3
y26 = 4293
drawindexed = 1, 4293, 0

[CustomShaderLLBakeSample4_RemielleBlackHairB]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackHairBIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 4
y26 = 5724
drawindexed = 1, 5724, 0

[CustomShaderLLBakeSample5_RemielleBlackHairB]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackHairBIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 5
y26 = 7155
drawindexed = 1, 7155, 0

[CustomShaderLLBakeSample6_RemielleBlackHairB]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackHairBIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 6
y26 = 8586
drawindexed = 1, 8586, 0

[CustomShaderLLBakeSample7_RemielleBlackHairB]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackHairBIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 7
y26 = 10017
drawindexed = 1, 10017, 0

[ResourceLLJiggleState_RemielleBlackHair]
type = RWBuffer
format = R32G32B32A32_FLOAT
array = 10

[ResourceLLDebugJiggle_RemielleBlackHair]
type = RWBuffer
format = R32G32B32A32_FLOAT
array = 17

[ResourceLLDebugJiggleVertex_RemielleBlackHair]
type = RWBuffer
format = R32G32B32A32_FLOAT
array = 21930

[ResourceLLJiggleTempVB0_RemielleBlackHair]
type = RWBuffer

[ResourceLLJiggleParams_RemielleBlackHair]
type = Buffer
format = R32G32B32A32_FLOAT
array = 8
data = 0.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 0.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000
; RZM Jiggle Interaction — RemielleBlackHair
; Jiggle colliders: 2

[CustomShaderLLJiggleRemielleBlackHair]
local $CursorXPast
local $CursorYPast
local $WasMouseButtonDown
local $back_x69 = x69
local $back_y69 = y69
local $back_z69 = z69
local $back_w69 = w69

if $isMouseButtonDown == 1
	if $WasMouseButtonDown == 0
		$CursorXPast = $cursorX
		$CursorYPast = $cursorY
	endif
	$WasMouseButtonDown = 1
	w67 = 1
else
	$WasMouseButtonDown = 0
	$CursorXPast = 0
	$CursorYPast = 0
	w67 = 0
endif

cs = Resources/IM/rzm_jiggle_interaction.hlsl

x67 = $CursorXPast
y67 = $CursorYPast

; Canonical fallback profile: a global winner ID may belong to another VB0.
x68 = 0.25
y68 = 1.00
z68 = 1.50
w68 = 1.00

; Current cursor must be PIXEL space (see CommandListLLCursorUpdate)
x69 = $cursorX
y69 = $cursorY
z69 = $screenW
w69 = $screenH

x70 = 0.86
y70 = 0.176
z70 = 0.96
w70 = 0.055

x71 = 0.50
y71 = 1.10
z71 = 1.00
w71 = 0.12

; [72].x = number of jiggle collider entries in ResourceLLJiggleParams
x72 = 2
y72 = $ll_jiggle_mult_radius_remielleblacklegsnback
z72 = $ll_jiggle_mult_strength_remielleblacklegsnback
w72 = $ll_jiggle_mult_spring_remielleblacklegsnback
x73 = $ll_jiggle_mult_damping_remielleblacklegsnback
y73 = 1.00
x74 = $ll_jiggle_debug_dump
x75 = $ll_jiggle_vertex_debug_dump
x76 = $ll_jiggle_delta_time_remielleblacklegsnback
y76 = $ll_jiggle_sim_speed_remielleblacklegsnback
z76 = $ll_jiggle_max_step_remielleblacklegsnback
x77 = $ll_jiggle_radius_slot_0_remielleblacklegsnback
y77 = $ll_jiggle_radius_slot_1_remielleblacklegsnback
z77 = $ll_jiggle_radius_slot_2_remielleblacklegsnback
w77 = $ll_jiggle_radius_slot_3_remielleblacklegsnback
x78 = $ll_jiggle_radius_slot_4_remielleblacklegsnback
y78 = $ll_jiggle_radius_slot_5_remielleblacklegsnback
z78 = $ll_jiggle_radius_slot_6_remielleblacklegsnback
w78 = $ll_jiggle_radius_slot_7_remielleblacklegsnback
x79 = $ll_jiggle_strength_slot_0_remielleblacklegsnback
y79 = $ll_jiggle_strength_slot_1_remielleblacklegsnback
z79 = $ll_jiggle_strength_slot_2_remielleblacklegsnback
w79 = $ll_jiggle_strength_slot_3_remielleblacklegsnback
x80 = $ll_jiggle_strength_slot_4_remielleblacklegsnback
y80 = $ll_jiggle_strength_slot_5_remielleblacklegsnback
z80 = $ll_jiggle_strength_slot_6_remielleblacklegsnback
w80 = $ll_jiggle_strength_slot_7_remielleblacklegsnback
x81 = $ll_jiggle_max_offset_slot_0_remielleblacklegsnback
y81 = $ll_jiggle_max_offset_slot_1_remielleblacklegsnback
z81 = $ll_jiggle_max_offset_slot_2_remielleblacklegsnback
w81 = $ll_jiggle_max_offset_slot_3_remielleblacklegsnback
x82 = $ll_jiggle_max_offset_slot_4_remielleblacklegsnback
y82 = $ll_jiggle_max_offset_slot_5_remielleblacklegsnback
z82 = $ll_jiggle_max_offset_slot_6_remielleblacklegsnback
w82 = $ll_jiggle_max_offset_slot_7_remielleblacklegsnback
x99 = $ll_jiggle_grabbable_slot_0_remielleblacklegsnback
y99 = $ll_jiggle_grabbable_slot_1_remielleblacklegsnback
z99 = $ll_jiggle_grabbable_slot_2_remielleblacklegsnback
w99 = $ll_jiggle_grabbable_slot_3_remielleblacklegsnback
x100 = $ll_jiggle_grabbable_slot_4_remielleblacklegsnback
y100 = $ll_jiggle_grabbable_slot_5_remielleblacklegsnback
z100 = $ll_jiggle_grabbable_slot_6_remielleblacklegsnback
w100 = $ll_jiggle_grabbable_slot_7_remielleblacklegsnback
x101 = $ll_jiggle_falloff_slot_0_remielleblacklegsnback
y101 = $ll_jiggle_falloff_slot_1_remielleblacklegsnback
z101 = $ll_jiggle_falloff_slot_2_remielleblacklegsnback
w101 = $ll_jiggle_falloff_slot_3_remielleblacklegsnback
x102 = $ll_jiggle_falloff_slot_4_remielleblacklegsnback
y102 = $ll_jiggle_falloff_slot_5_remielleblacklegsnback
z102 = $ll_jiggle_falloff_slot_6_remielleblacklegsnback
w102 = $ll_jiggle_falloff_slot_7_remielleblacklegsnback
x119 = $ll_jiggle_path_mode_slot_0_remielleblacklegsnback
y119 = $ll_jiggle_path_mode_slot_1_remielleblacklegsnback
z119 = $ll_jiggle_path_mode_slot_2_remielleblacklegsnback
w119 = $ll_jiggle_path_mode_slot_3_remielleblacklegsnback
x120 = $ll_jiggle_path_mode_slot_4_remielleblacklegsnback
y120 = $ll_jiggle_path_mode_slot_5_remielleblacklegsnback
z120 = $ll_jiggle_path_mode_slot_6_remielleblacklegsnback
w120 = $ll_jiggle_path_mode_slot_7_remielleblacklegsnback
; Zones 8-11. Registers 103/106/109/112/116/121 (115 belongs to an
; unrelated resize-shapekeys feature -- see LLMEXT_RESIZE.hlsl ORIG_V_COUNT).
x103 = $ll_jiggle_radius_slot_8_remielleblacklegsnback
y103 = $ll_jiggle_radius_slot_9_remielleblacklegsnback
z103 = $ll_jiggle_radius_slot_10_remielleblacklegsnback
w103 = $ll_jiggle_radius_slot_11_remielleblacklegsnback
x106 = $ll_jiggle_strength_slot_8_remielleblacklegsnback
y106 = $ll_jiggle_strength_slot_9_remielleblacklegsnback
z106 = $ll_jiggle_strength_slot_10_remielleblacklegsnback
w106 = $ll_jiggle_strength_slot_11_remielleblacklegsnback
x109 = $ll_jiggle_max_offset_slot_8_remielleblacklegsnback
y109 = $ll_jiggle_max_offset_slot_9_remielleblacklegsnback
z109 = $ll_jiggle_max_offset_slot_10_remielleblacklegsnback
w109 = $ll_jiggle_max_offset_slot_11_remielleblacklegsnback
x112 = $ll_jiggle_grabbable_slot_8_remielleblacklegsnback
y112 = $ll_jiggle_grabbable_slot_9_remielleblacklegsnback
z112 = $ll_jiggle_grabbable_slot_10_remielleblacklegsnback
w112 = $ll_jiggle_grabbable_slot_11_remielleblacklegsnback
x116 = $ll_jiggle_falloff_slot_8_remielleblacklegsnback
y116 = $ll_jiggle_falloff_slot_9_remielleblacklegsnback
z116 = $ll_jiggle_falloff_slot_10_remielleblacklegsnback
w116 = $ll_jiggle_falloff_slot_11_remielleblacklegsnback
x121 = $ll_jiggle_path_mode_slot_8_remielleblacklegsnback
y121 = $ll_jiggle_path_mode_slot_9_remielleblacklegsnback
z121 = $ll_jiggle_path_mode_slot_10_remielleblacklegsnback
w121 = $ll_jiggle_path_mode_slot_11_remielleblacklegsnback
x122 = $ll_jiggle_damping_slot_0_remielleblacklegsnback
y122 = $ll_jiggle_damping_slot_1_remielleblacklegsnback
z122 = $ll_jiggle_damping_slot_2_remielleblacklegsnback
w122 = $ll_jiggle_damping_slot_3_remielleblacklegsnback
x123 = $ll_jiggle_damping_slot_4_remielleblacklegsnback
y123 = $ll_jiggle_damping_slot_5_remielleblacklegsnback
z123 = $ll_jiggle_damping_slot_6_remielleblacklegsnback
w123 = $ll_jiggle_damping_slot_7_remielleblacklegsnback
x124 = $ll_jiggle_damping_slot_8_remielleblacklegsnback
y124 = $ll_jiggle_damping_slot_9_remielleblacklegsnback
z124 = $ll_jiggle_damping_slot_10_remielleblacklegsnback
w124 = $ll_jiggle_damping_slot_11_remielleblacklegsnback
x125 = $ll_jiggle_swing_mode_slot_0_remielleblacklegsnback
y125 = $ll_jiggle_swing_mode_slot_1_remielleblacklegsnback
z125 = $ll_jiggle_swing_mode_slot_2_remielleblacklegsnback
w125 = $ll_jiggle_swing_mode_slot_3_remielleblacklegsnback
x126 = $ll_jiggle_swing_mode_slot_4_remielleblacklegsnback
y126 = $ll_jiggle_swing_mode_slot_5_remielleblacklegsnback
z126 = $ll_jiggle_swing_mode_slot_6_remielleblacklegsnback
w126 = $ll_jiggle_swing_mode_slot_7_remielleblacklegsnback
x127 = $ll_jiggle_swing_mode_slot_8_remielleblacklegsnback
y127 = $ll_jiggle_swing_mode_slot_9_remielleblacklegsnback
z127 = $ll_jiggle_swing_mode_slot_10_remielleblacklegsnback
w127 = $ll_jiggle_swing_mode_slot_11_remielleblacklegsnback
x128 = $ll_jiggle_swing_min_a_slot_0_remielleblacklegsnback
y128 = $ll_jiggle_swing_min_a_slot_1_remielleblacklegsnback
z128 = $ll_jiggle_swing_min_a_slot_2_remielleblacklegsnback
w128 = $ll_jiggle_swing_min_a_slot_3_remielleblacklegsnback
x129 = $ll_jiggle_swing_min_a_slot_4_remielleblacklegsnback
y129 = $ll_jiggle_swing_min_a_slot_5_remielleblacklegsnback
z129 = $ll_jiggle_swing_min_a_slot_6_remielleblacklegsnback
w129 = $ll_jiggle_swing_min_a_slot_7_remielleblacklegsnback
x130 = $ll_jiggle_swing_min_a_slot_8_remielleblacklegsnback
y130 = $ll_jiggle_swing_min_a_slot_9_remielleblacklegsnback
z130 = $ll_jiggle_swing_min_a_slot_10_remielleblacklegsnback
w130 = $ll_jiggle_swing_min_a_slot_11_remielleblacklegsnback
x134 = $ll_jiggle_swing_max_a_slot_0_remielleblacklegsnback
y134 = $ll_jiggle_swing_max_a_slot_1_remielleblacklegsnback
z134 = $ll_jiggle_swing_max_a_slot_2_remielleblacklegsnback
w134 = $ll_jiggle_swing_max_a_slot_3_remielleblacklegsnback
x135 = $ll_jiggle_swing_max_a_slot_4_remielleblacklegsnback
y135 = $ll_jiggle_swing_max_a_slot_5_remielleblacklegsnback
z135 = $ll_jiggle_swing_max_a_slot_6_remielleblacklegsnback
w135 = $ll_jiggle_swing_max_a_slot_7_remielleblacklegsnback
x136 = $ll_jiggle_swing_max_a_slot_8_remielleblacklegsnback
y136 = $ll_jiggle_swing_max_a_slot_9_remielleblacklegsnback
z136 = $ll_jiggle_swing_max_a_slot_10_remielleblacklegsnback
w136 = $ll_jiggle_swing_max_a_slot_11_remielleblacklegsnback
x137 = $ll_jiggle_swing_min_b_slot_0_remielleblacklegsnback
y137 = $ll_jiggle_swing_min_b_slot_1_remielleblacklegsnback
z137 = $ll_jiggle_swing_min_b_slot_2_remielleblacklegsnback
w137 = $ll_jiggle_swing_min_b_slot_3_remielleblacklegsnback
x138 = $ll_jiggle_swing_min_b_slot_4_remielleblacklegsnback
y138 = $ll_jiggle_swing_min_b_slot_5_remielleblacklegsnback
z138 = $ll_jiggle_swing_min_b_slot_6_remielleblacklegsnback
w138 = $ll_jiggle_swing_min_b_slot_7_remielleblacklegsnback
x139 = $ll_jiggle_swing_min_b_slot_8_remielleblacklegsnback
y139 = $ll_jiggle_swing_min_b_slot_9_remielleblacklegsnback
z139 = $ll_jiggle_swing_min_b_slot_10_remielleblacklegsnback
w139 = $ll_jiggle_swing_min_b_slot_11_remielleblacklegsnback
x140 = $ll_jiggle_swing_max_b_slot_0_remielleblacklegsnback
y140 = $ll_jiggle_swing_max_b_slot_1_remielleblacklegsnback
z140 = $ll_jiggle_swing_max_b_slot_2_remielleblacklegsnback
w140 = $ll_jiggle_swing_max_b_slot_3_remielleblacklegsnback
x141 = $ll_jiggle_swing_max_b_slot_4_remielleblacklegsnback
y141 = $ll_jiggle_swing_max_b_slot_5_remielleblacklegsnback
z141 = $ll_jiggle_swing_max_b_slot_6_remielleblacklegsnback
w141 = $ll_jiggle_swing_max_b_slot_7_remielleblacklegsnback
x142 = $ll_jiggle_swing_max_b_slot_8_remielleblacklegsnback
y142 = $ll_jiggle_swing_max_b_slot_9_remielleblacklegsnback
z142 = $ll_jiggle_swing_max_b_slot_10_remielleblacklegsnback
w142 = $ll_jiggle_swing_max_b_slot_11_remielleblacklegsnback
x131 = $ll_jiggle_swing_axis_mode_slot_0_remielleblacklegsnback
y131 = $ll_jiggle_swing_axis_mode_slot_1_remielleblacklegsnback
z131 = $ll_jiggle_swing_axis_mode_slot_2_remielleblacklegsnback
w131 = $ll_jiggle_swing_axis_mode_slot_3_remielleblacklegsnback
x132 = $ll_jiggle_swing_axis_mode_slot_4_remielleblacklegsnback
y132 = $ll_jiggle_swing_axis_mode_slot_5_remielleblacklegsnback
z132 = $ll_jiggle_swing_axis_mode_slot_6_remielleblacklegsnback
w132 = $ll_jiggle_swing_axis_mode_slot_7_remielleblacklegsnback
x133 = $ll_jiggle_swing_axis_mode_slot_8_remielleblacklegsnback
y133 = $ll_jiggle_swing_axis_mode_slot_9_remielleblacklegsnback
z133 = $ll_jiggle_swing_axis_mode_slot_10_remielleblacklegsnback
w133 = $ll_jiggle_swing_axis_mode_slot_11_remielleblacklegsnback
; Live axis constraint (Shift/Ctrl). Written wherever the swing registers
; are, rather than relying on Present having run -- IniParams are global
; with no guaranteed ordering between dispatches.
x143 = $ll_jiggle_axis_select_remielleblacklegsnback

; Global frame-N winner, published by PinDetected after all component scans.
; Do not copy a per-component mid-frame snapshot here: it creates seams.
; The frame input is global, but hit/basis are local to this VB0.  Consume
; the component-local pinned anchor rather than the global winner.
cs-t67 = ResourceLLPinnedComponentInfo_RemielleBlackHair
cs-t68 = ResourceLLJiggleParams_RemielleBlackHair
cs-t65 = ResourceLLJiggleMasks0_RemielleBlackHair
cs-t66 = ResourceLLJiggleMasks1_RemielleBlackHair
cs-t69 = ResourceLLJiggleMasks2_RemielleBlackHair
cs-t71 = ResourceLLJiggleScreenState
cs-t73 = ResourceLLPathVectors
cs-t74 = ResourceLLPathProgressState
cs-t75 = ResourceLLSwingPivots
cs-t76 = ResourceLLSwingAxisX
cs-t77 = ResourceLLSwingAxisY

cs-u6 = ResourceLLJiggleState_RemielleBlackHair
cs-u7 = ResourceLLDebugJiggle_RemielleBlackHair
cs-u4 = ResourceLLDebugJiggleVertex_RemielleBlackHair
; Shared, not per-component: only the component holding the grabbed vertex
; writes it, so there is exactly one writer per frame.
cs-u3 = ResourceLLSwingGrabDelta

ResourceLLJiggleTempVB0_RemielleBlackHair = vb0
cs-t24 = vb0
cs-u5 = copy ResourceLLJiggleTempVB0_RemielleBlackHair

Dispatch = (7310 + 255) // 256, 1, 1

vb0 = null
ResourceLLJiggleTempVB0_RemielleBlackHair = copy cs-u5
; The copied output is now original-draw VB0, so it cannot remain a UAV.
cs-u5 = null
cs-u6 = null
cs-u7 = null
cs-u4 = null
cs-u3 = null
cs-t71 = null

post x69 = $back_x69
post y69 = $back_y69
post z69 = $back_z69
post w69 = $back_w69

[ResourceLLDetectRemielleBlackBodyObjectMap]
type = Buffer
format = R32G32B32A32_FLOAT
filename = RemielleBlackBodyObjectMap.buf

[ResourceLLJiggleMasks0_RemielleBlackBody]
type = Buffer
format = R32G32B32A32_FLOAT
filename = RemielleBlackBodyJiggleMasks0.buf

[ResourceLLJiggleMasks1_RemielleBlackBody]
type = Buffer
format = R32G32B32A32_FLOAT
filename = RemielleBlackBodyJiggleMasks1.buf

[ResourceLLJiggleMasks2_RemielleBlackBody]
type = Buffer
format = R32G32B32A32_FLOAT
filename = RemielleBlackBodyJiggleMasks2.buf

[ResourceLLDebugDetect_RemielleBlackBody]
type = RWBuffer
format = R32G32B32A32_FLOAT
array = 23

[ResourceLLComponentDetect_RemielleBlackBody]
type = RWBuffer
format = R32G32B32A32_FLOAT
array = 15

[ResourceLLPinnedComponentID_RemielleBlackBody]
type = RWBuffer
format = R32_FLOAT
array = 1

[ResourceLLPinnedComponentInfo_RemielleBlackBody]
type = RWBuffer
format = R32G32B32A32_FLOAT
array = 15

[CustomShaderLLDetectRemielleBlackBody]
cs = Resources/IM/rzm_object_detect.hlsl
x28 = 0
cs-t0 = vb0
cs-t1 = ib
cs-t2 = ResourceLLDetectRemielleBlackBodyObjectMap
cs-t3 = ResourceLLBakeRT
cs-t4 = ResourceLLJiggleMasks0_RemielleBlackBody
cs-t5 = ResourceLLJiggleMasks1_RemielleBlackBody
cs-t7 = ResourceLLJiggleMasks2_RemielleBlackBody
cs-t6 = ResourceLLViewportFrameAPI
cs-u0 = ResourceLLDetectID
cs-u1 = ResourceLLComponentDetect_RemielleBlackBody
cs-u2 = ResourceLLDebugDetect_RemielleBlackBody
x24 = $cursorX
y24 = $cursorY
z24 = $screenW
w24 = $screenH
x25 = $isMouseButtonDown
x26 = $ll_jiggle_component_anchor_px_remielleblacklegsnback
w26 = 8.0
x27 = $cursorX
y27 = $cursorY
z27 = res_width
w27 = res_height
x85 = $ll_viewport_offset_x
y85 = $ll_viewport_offset_y
z85 = $ll_viewport_scale_x
w85 = $ll_viewport_scale_y
x86 = $ll_viewport_valid
x74 = $ll_jiggle_debug_dump
dispatch = 1, 1, 1
; This is only the frame accumulator.  PinDetected consumes it later.
; Unbind the UAV before the following jiggle pass sets its shader resources.
cs-u0 = null
cs-u1 = null
cs-u2 = null

[CustomShaderLLBakeRemielleBlackBodyA]
run = BuiltInCommandListUnbindAllRenderTargets
clear = ResourceLLBakeRT 0.0
run = CustomShaderLLBakeSample0_RemielleBlackBodyA
run = CustomShaderLLBakeSample1_RemielleBlackBodyA
run = CustomShaderLLBakeSample2_RemielleBlackBodyA
run = CustomShaderLLBakeSample3_RemielleBlackBodyA
run = CustomShaderLLBakeSample4_RemielleBlackBodyA
run = CustomShaderLLBakeSample5_RemielleBlackBodyA
run = CustomShaderLLBakeSample6_RemielleBlackBodyA
run = CustomShaderLLBakeSample7_RemielleBlackBodyA

[CustomShaderLLBakeSample0_RemielleBlackBodyA]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackBodyAIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 0
y26 = 0
drawindexed = 1, 0, 0

[CustomShaderLLBakeSample1_RemielleBlackBodyA]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackBodyAIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 1
y26 = 34594
drawindexed = 1, 34594, 0

[CustomShaderLLBakeSample2_RemielleBlackBodyA]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackBodyAIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 2
y26 = 69188
drawindexed = 1, 69188, 0

[CustomShaderLLBakeSample3_RemielleBlackBodyA]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackBodyAIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 3
y26 = 103782
drawindexed = 1, 103782, 0

[CustomShaderLLBakeSample4_RemielleBlackBodyA]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackBodyAIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 4
y26 = 138376
drawindexed = 1, 138376, 0

[CustomShaderLLBakeSample5_RemielleBlackBodyA]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackBodyAIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 5
y26 = 172970
drawindexed = 1, 172970, 0

[CustomShaderLLBakeSample6_RemielleBlackBodyA]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackBodyAIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 6
y26 = 207564
drawindexed = 1, 207564, 0

[CustomShaderLLBakeSample7_RemielleBlackBodyA]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackBodyAIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 7
y26 = 242158
drawindexed = 1, 242158, 0

[CustomShaderLLBakeRemielleBlackBodyB]
run = BuiltInCommandListUnbindAllRenderTargets
clear = ResourceLLBakeRT 0.0
run = CustomShaderLLBakeSample0_RemielleBlackBodyB
run = CustomShaderLLBakeSample1_RemielleBlackBodyB
run = CustomShaderLLBakeSample2_RemielleBlackBodyB
run = CustomShaderLLBakeSample3_RemielleBlackBodyB
run = CustomShaderLLBakeSample4_RemielleBlackBodyB
run = CustomShaderLLBakeSample5_RemielleBlackBodyB
run = CustomShaderLLBakeSample6_RemielleBlackBodyB
run = CustomShaderLLBakeSample7_RemielleBlackBodyB

[CustomShaderLLBakeSample0_RemielleBlackBodyB]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackBodyBIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 0
y26 = 0
drawindexed = 1, 0, 0

[CustomShaderLLBakeSample1_RemielleBlackBodyB]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackBodyBIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 1
y26 = 27
drawindexed = 1, 27, 0

[CustomShaderLLBakeSample2_RemielleBlackBodyB]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackBodyBIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 2
y26 = 54
drawindexed = 1, 54, 0

[CustomShaderLLBakeSample3_RemielleBlackBodyB]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackBodyBIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 3
y26 = 81
drawindexed = 1, 81, 0

[CustomShaderLLBakeSample4_RemielleBlackBodyB]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackBodyBIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 4
y26 = 108
drawindexed = 1, 108, 0

[CustomShaderLLBakeSample5_RemielleBlackBodyB]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackBodyBIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 5
y26 = 135
drawindexed = 1, 135, 0

[CustomShaderLLBakeSample6_RemielleBlackBodyB]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackBodyBIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 6
y26 = 162
drawindexed = 1, 162, 0

[CustomShaderLLBakeSample7_RemielleBlackBodyB]
gs = Resources/IM/rzm_gs_probe.hlsl
gs-t1 = ResourceRemielleBlackBodyBIB
ps = Resources/IM/rzm_gs_probe.hlsl
topology = point_list
o0 = set_viewport no_view_cache ResourceLLBakeRT
x26 = 7
y26 = 189
drawindexed = 1, 189, 0

[ResourceLLJiggleState_RemielleBlackBody]
type = RWBuffer
format = R32G32B32A32_FLOAT
array = 10

[ResourceLLDebugJiggle_RemielleBlackBody]
type = RWBuffer
format = R32G32B32A32_FLOAT
array = 17

[ResourceLLDebugJiggleVertex_RemielleBlackBody]
type = RWBuffer
format = R32G32B32A32_FLOAT
array = 208329

[ResourceLLJiggleTempVB0_RemielleBlackBody]
type = RWBuffer

[ResourceLLJiggleParams_RemielleBlackBody]
type = Buffer
format = R32G32B32A32_FLOAT
array = 132
data = 0.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 2400.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 7308.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 14925.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 15825.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 20505.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 20766.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 23250.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 39804.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 56694.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 73584.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 85425.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 91392.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 91704.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 94644.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 104256.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 105834.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 106122.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 115080.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 116406.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 128190.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 130668.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 140982.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 143436.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 153750.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 175008.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 178140.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 199398.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 220656.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 241914.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 273546.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 0.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000 174.000000 0.250000 1.000000 1.500000 1.000000 0.860000 0.176000 0.960000 0.055000 1.180000 0.500000 0.120000 0.000000 0.000000 0.000000 0.000000
; RZM Jiggle Interaction — RemielleBlackBody
; Jiggle colliders: 33

[CustomShaderLLJiggleRemielleBlackBody]
local $CursorXPast
local $CursorYPast
local $WasMouseButtonDown
local $back_x69 = x69
local $back_y69 = y69
local $back_z69 = z69
local $back_w69 = w69

if $isMouseButtonDown == 1
	if $WasMouseButtonDown == 0
		$CursorXPast = $cursorX
		$CursorYPast = $cursorY
	endif
	$WasMouseButtonDown = 1
	w67 = 1
else
	$WasMouseButtonDown = 0
	$CursorXPast = 0
	$CursorYPast = 0
	w67 = 0
endif

cs = Resources/IM/rzm_jiggle_interaction.hlsl

x67 = $CursorXPast
y67 = $CursorYPast

; Canonical fallback profile: a global winner ID may belong to another VB0.
x68 = 0.25
y68 = 1.00
z68 = 1.50
w68 = 1.00

; Current cursor must be PIXEL space (see CommandListLLCursorUpdate)
x69 = $cursorX
y69 = $cursorY
z69 = $screenW
w69 = $screenH

x70 = 0.86
y70 = 0.176
z70 = 0.96
w70 = 0.055

x71 = 0.50
y71 = 1.10
z71 = 1.00
w71 = 0.12

; [72].x = number of jiggle collider entries in ResourceLLJiggleParams
x72 = 33
y72 = $ll_jiggle_mult_radius_remielleblacklegsnback
z72 = $ll_jiggle_mult_strength_remielleblacklegsnback
w72 = $ll_jiggle_mult_spring_remielleblacklegsnback
x73 = $ll_jiggle_mult_damping_remielleblacklegsnback
y73 = 1.00
x74 = $ll_jiggle_debug_dump
x75 = $ll_jiggle_vertex_debug_dump
x76 = $ll_jiggle_delta_time_remielleblacklegsnback
y76 = $ll_jiggle_sim_speed_remielleblacklegsnback
z76 = $ll_jiggle_max_step_remielleblacklegsnback
x77 = $ll_jiggle_radius_slot_0_remielleblacklegsnback
y77 = $ll_jiggle_radius_slot_1_remielleblacklegsnback
z77 = $ll_jiggle_radius_slot_2_remielleblacklegsnback
w77 = $ll_jiggle_radius_slot_3_remielleblacklegsnback
x78 = $ll_jiggle_radius_slot_4_remielleblacklegsnback
y78 = $ll_jiggle_radius_slot_5_remielleblacklegsnback
z78 = $ll_jiggle_radius_slot_6_remielleblacklegsnback
w78 = $ll_jiggle_radius_slot_7_remielleblacklegsnback
x79 = $ll_jiggle_strength_slot_0_remielleblacklegsnback
y79 = $ll_jiggle_strength_slot_1_remielleblacklegsnback
z79 = $ll_jiggle_strength_slot_2_remielleblacklegsnback
w79 = $ll_jiggle_strength_slot_3_remielleblacklegsnback
x80 = $ll_jiggle_strength_slot_4_remielleblacklegsnback
y80 = $ll_jiggle_strength_slot_5_remielleblacklegsnback
z80 = $ll_jiggle_strength_slot_6_remielleblacklegsnback
w80 = $ll_jiggle_strength_slot_7_remielleblacklegsnback
x81 = $ll_jiggle_max_offset_slot_0_remielleblacklegsnback
y81 = $ll_jiggle_max_offset_slot_1_remielleblacklegsnback
z81 = $ll_jiggle_max_offset_slot_2_remielleblacklegsnback
w81 = $ll_jiggle_max_offset_slot_3_remielleblacklegsnback
x82 = $ll_jiggle_max_offset_slot_4_remielleblacklegsnback
y82 = $ll_jiggle_max_offset_slot_5_remielleblacklegsnback
z82 = $ll_jiggle_max_offset_slot_6_remielleblacklegsnback
w82 = $ll_jiggle_max_offset_slot_7_remielleblacklegsnback
x99 = $ll_jiggle_grabbable_slot_0_remielleblacklegsnback
y99 = $ll_jiggle_grabbable_slot_1_remielleblacklegsnback
z99 = $ll_jiggle_grabbable_slot_2_remielleblacklegsnback
w99 = $ll_jiggle_grabbable_slot_3_remielleblacklegsnback
x100 = $ll_jiggle_grabbable_slot_4_remielleblacklegsnback
y100 = $ll_jiggle_grabbable_slot_5_remielleblacklegsnback
z100 = $ll_jiggle_grabbable_slot_6_remielleblacklegsnback
w100 = $ll_jiggle_grabbable_slot_7_remielleblacklegsnback
x101 = $ll_jiggle_falloff_slot_0_remielleblacklegsnback
y101 = $ll_jiggle_falloff_slot_1_remielleblacklegsnback
z101 = $ll_jiggle_falloff_slot_2_remielleblacklegsnback
w101 = $ll_jiggle_falloff_slot_3_remielleblacklegsnback
x102 = $ll_jiggle_falloff_slot_4_remielleblacklegsnback
y102 = $ll_jiggle_falloff_slot_5_remielleblacklegsnback
z102 = $ll_jiggle_falloff_slot_6_remielleblacklegsnback
w102 = $ll_jiggle_falloff_slot_7_remielleblacklegsnback
x119 = $ll_jiggle_path_mode_slot_0_remielleblacklegsnback
y119 = $ll_jiggle_path_mode_slot_1_remielleblacklegsnback
z119 = $ll_jiggle_path_mode_slot_2_remielleblacklegsnback
w119 = $ll_jiggle_path_mode_slot_3_remielleblacklegsnback
x120 = $ll_jiggle_path_mode_slot_4_remielleblacklegsnback
y120 = $ll_jiggle_path_mode_slot_5_remielleblacklegsnback
z120 = $ll_jiggle_path_mode_slot_6_remielleblacklegsnback
w120 = $ll_jiggle_path_mode_slot_7_remielleblacklegsnback
; Zones 8-11. Registers 103/106/109/112/116/121 (115 belongs to an
; unrelated resize-shapekeys feature -- see LLMEXT_RESIZE.hlsl ORIG_V_COUNT).
x103 = $ll_jiggle_radius_slot_8_remielleblacklegsnback
y103 = $ll_jiggle_radius_slot_9_remielleblacklegsnback
z103 = $ll_jiggle_radius_slot_10_remielleblacklegsnback
w103 = $ll_jiggle_radius_slot_11_remielleblacklegsnback
x106 = $ll_jiggle_strength_slot_8_remielleblacklegsnback
y106 = $ll_jiggle_strength_slot_9_remielleblacklegsnback
z106 = $ll_jiggle_strength_slot_10_remielleblacklegsnback
w106 = $ll_jiggle_strength_slot_11_remielleblacklegsnback
x109 = $ll_jiggle_max_offset_slot_8_remielleblacklegsnback
y109 = $ll_jiggle_max_offset_slot_9_remielleblacklegsnback
z109 = $ll_jiggle_max_offset_slot_10_remielleblacklegsnback
w109 = $ll_jiggle_max_offset_slot_11_remielleblacklegsnback
x112 = $ll_jiggle_grabbable_slot_8_remielleblacklegsnback
y112 = $ll_jiggle_grabbable_slot_9_remielleblacklegsnback
z112 = $ll_jiggle_grabbable_slot_10_remielleblacklegsnback
w112 = $ll_jiggle_grabbable_slot_11_remielleblacklegsnback
x116 = $ll_jiggle_falloff_slot_8_remielleblacklegsnback
y116 = $ll_jiggle_falloff_slot_9_remielleblacklegsnback
z116 = $ll_jiggle_falloff_slot_10_remielleblacklegsnback
w116 = $ll_jiggle_falloff_slot_11_remielleblacklegsnback
x121 = $ll_jiggle_path_mode_slot_8_remielleblacklegsnback
y121 = $ll_jiggle_path_mode_slot_9_remielleblacklegsnback
z121 = $ll_jiggle_path_mode_slot_10_remielleblacklegsnback
w121 = $ll_jiggle_path_mode_slot_11_remielleblacklegsnback
x122 = $ll_jiggle_damping_slot_0_remielleblacklegsnback
y122 = $ll_jiggle_damping_slot_1_remielleblacklegsnback
z122 = $ll_jiggle_damping_slot_2_remielleblacklegsnback
w122 = $ll_jiggle_damping_slot_3_remielleblacklegsnback
x123 = $ll_jiggle_damping_slot_4_remielleblacklegsnback
y123 = $ll_jiggle_damping_slot_5_remielleblacklegsnback
z123 = $ll_jiggle_damping_slot_6_remielleblacklegsnback
w123 = $ll_jiggle_damping_slot_7_remielleblacklegsnback
x124 = $ll_jiggle_damping_slot_8_remielleblacklegsnback
y124 = $ll_jiggle_damping_slot_9_remielleblacklegsnback
z124 = $ll_jiggle_damping_slot_10_remielleblacklegsnback
w124 = $ll_jiggle_damping_slot_11_remielleblacklegsnback
x125 = $ll_jiggle_swing_mode_slot_0_remielleblacklegsnback
y125 = $ll_jiggle_swing_mode_slot_1_remielleblacklegsnback
z125 = $ll_jiggle_swing_mode_slot_2_remielleblacklegsnback
w125 = $ll_jiggle_swing_mode_slot_3_remielleblacklegsnback
x126 = $ll_jiggle_swing_mode_slot_4_remielleblacklegsnback
y126 = $ll_jiggle_swing_mode_slot_5_remielleblacklegsnback
z126 = $ll_jiggle_swing_mode_slot_6_remielleblacklegsnback
w126 = $ll_jiggle_swing_mode_slot_7_remielleblacklegsnback
x127 = $ll_jiggle_swing_mode_slot_8_remielleblacklegsnback
y127 = $ll_jiggle_swing_mode_slot_9_remielleblacklegsnback
z127 = $ll_jiggle_swing_mode_slot_10_remielleblacklegsnback
w127 = $ll_jiggle_swing_mode_slot_11_remielleblacklegsnback
x128 = $ll_jiggle_swing_min_a_slot_0_remielleblacklegsnback
y128 = $ll_jiggle_swing_min_a_slot_1_remielleblacklegsnback
z128 = $ll_jiggle_swing_min_a_slot_2_remielleblacklegsnback
w128 = $ll_jiggle_swing_min_a_slot_3_remielleblacklegsnback
x129 = $ll_jiggle_swing_min_a_slot_4_remielleblacklegsnback
y129 = $ll_jiggle_swing_min_a_slot_5_remielleblacklegsnback
z129 = $ll_jiggle_swing_min_a_slot_6_remielleblacklegsnback
w129 = $ll_jiggle_swing_min_a_slot_7_remielleblacklegsnback
x130 = $ll_jiggle_swing_min_a_slot_8_remielleblacklegsnback
y130 = $ll_jiggle_swing_min_a_slot_9_remielleblacklegsnback
z130 = $ll_jiggle_swing_min_a_slot_10_remielleblacklegsnback
w130 = $ll_jiggle_swing_min_a_slot_11_remielleblacklegsnback
x134 = $ll_jiggle_swing_max_a_slot_0_remielleblacklegsnback
y134 = $ll_jiggle_swing_max_a_slot_1_remielleblacklegsnback
z134 = $ll_jiggle_swing_max_a_slot_2_remielleblacklegsnback
w134 = $ll_jiggle_swing_max_a_slot_3_remielleblacklegsnback
x135 = $ll_jiggle_swing_max_a_slot_4_remielleblacklegsnback
y135 = $ll_jiggle_swing_max_a_slot_5_remielleblacklegsnback
z135 = $ll_jiggle_swing_max_a_slot_6_remielleblacklegsnback
w135 = $ll_jiggle_swing_max_a_slot_7_remielleblacklegsnback
x136 = $ll_jiggle_swing_max_a_slot_8_remielleblacklegsnback
y136 = $ll_jiggle_swing_max_a_slot_9_remielleblacklegsnback
z136 = $ll_jiggle_swing_max_a_slot_10_remielleblacklegsnback
w136 = $ll_jiggle_swing_max_a_slot_11_remielleblacklegsnback
x137 = $ll_jiggle_swing_min_b_slot_0_remielleblacklegsnback
y137 = $ll_jiggle_swing_min_b_slot_1_remielleblacklegsnback
z137 = $ll_jiggle_swing_min_b_slot_2_remielleblacklegsnback
w137 = $ll_jiggle_swing_min_b_slot_3_remielleblacklegsnback
x138 = $ll_jiggle_swing_min_b_slot_4_remielleblacklegsnback
y138 = $ll_jiggle_swing_min_b_slot_5_remielleblacklegsnback
z138 = $ll_jiggle_swing_min_b_slot_6_remielleblacklegsnback
w138 = $ll_jiggle_swing_min_b_slot_7_remielleblacklegsnback
x139 = $ll_jiggle_swing_min_b_slot_8_remielleblacklegsnback
y139 = $ll_jiggle_swing_min_b_slot_9_remielleblacklegsnback
z139 = $ll_jiggle_swing_min_b_slot_10_remielleblacklegsnback
w139 = $ll_jiggle_swing_min_b_slot_11_remielleblacklegsnback
x140 = $ll_jiggle_swing_max_b_slot_0_remielleblacklegsnback
y140 = $ll_jiggle_swing_max_b_slot_1_remielleblacklegsnback
z140 = $ll_jiggle_swing_max_b_slot_2_remielleblacklegsnback
w140 = $ll_jiggle_swing_max_b_slot_3_remielleblacklegsnback
x141 = $ll_jiggle_swing_max_b_slot_4_remielleblacklegsnback
y141 = $ll_jiggle_swing_max_b_slot_5_remielleblacklegsnback
z141 = $ll_jiggle_swing_max_b_slot_6_remielleblacklegsnback
w141 = $ll_jiggle_swing_max_b_slot_7_remielleblacklegsnback
x142 = $ll_jiggle_swing_max_b_slot_8_remielleblacklegsnback
y142 = $ll_jiggle_swing_max_b_slot_9_remielleblacklegsnback
z142 = $ll_jiggle_swing_max_b_slot_10_remielleblacklegsnback
w142 = $ll_jiggle_swing_max_b_slot_11_remielleblacklegsnback
x131 = $ll_jiggle_swing_axis_mode_slot_0_remielleblacklegsnback
y131 = $ll_jiggle_swing_axis_mode_slot_1_remielleblacklegsnback
z131 = $ll_jiggle_swing_axis_mode_slot_2_remielleblacklegsnback
w131 = $ll_jiggle_swing_axis_mode_slot_3_remielleblacklegsnback
x132 = $ll_jiggle_swing_axis_mode_slot_4_remielleblacklegsnback
y132 = $ll_jiggle_swing_axis_mode_slot_5_remielleblacklegsnback
z132 = $ll_jiggle_swing_axis_mode_slot_6_remielleblacklegsnback
w132 = $ll_jiggle_swing_axis_mode_slot_7_remielleblacklegsnback
x133 = $ll_jiggle_swing_axis_mode_slot_8_remielleblacklegsnback
y133 = $ll_jiggle_swing_axis_mode_slot_9_remielleblacklegsnback
z133 = $ll_jiggle_swing_axis_mode_slot_10_remielleblacklegsnback
w133 = $ll_jiggle_swing_axis_mode_slot_11_remielleblacklegsnback
; Live axis constraint (Shift/Ctrl). Written wherever the swing registers
; are, rather than relying on Present having run -- IniParams are global
; with no guaranteed ordering between dispatches.
x143 = $ll_jiggle_axis_select_remielleblacklegsnback

; Global frame-N winner, published by PinDetected after all component scans.
; Do not copy a per-component mid-frame snapshot here: it creates seams.
; The frame input is global, but hit/basis are local to this VB0.  Consume
; the component-local pinned anchor rather than the global winner.
cs-t67 = ResourceLLPinnedComponentInfo_RemielleBlackBody
cs-t68 = ResourceLLJiggleParams_RemielleBlackBody
cs-t65 = ResourceLLJiggleMasks0_RemielleBlackBody
cs-t66 = ResourceLLJiggleMasks1_RemielleBlackBody
cs-t69 = ResourceLLJiggleMasks2_RemielleBlackBody
cs-t71 = ResourceLLJiggleScreenState
cs-t73 = ResourceLLPathVectors
cs-t74 = ResourceLLPathProgressState
cs-t75 = ResourceLLSwingPivots
cs-t76 = ResourceLLSwingAxisX
cs-t77 = ResourceLLSwingAxisY

cs-u6 = ResourceLLJiggleState_RemielleBlackBody
cs-u7 = ResourceLLDebugJiggle_RemielleBlackBody
cs-u4 = ResourceLLDebugJiggleVertex_RemielleBlackBody
; Shared, not per-component: only the component holding the grabbed vertex
; writes it, so there is exactly one writer per frame.
cs-u3 = ResourceLLSwingGrabDelta

ResourceLLJiggleTempVB0_RemielleBlackBody = vb0
cs-t24 = vb0
cs-u5 = copy ResourceLLJiggleTempVB0_RemielleBlackBody

Dispatch = (69443 + 255) // 256, 1, 1

vb0 = null
ResourceLLJiggleTempVB0_RemielleBlackBody = copy cs-u5
; The copied output is now original-draw VB0, so it cannot remain a UAV.
cs-u5 = null
cs-u6 = null
cs-u7 = null
cs-u4 = null
cs-u3 = null
cs-t71 = null

post x69 = $back_x69
post y69 = $back_y69
post z69 = $back_z69
post w69 = $back_w69





; Body-size jiggle scaling: each zone's max_offset is multiplied by whichever
; resize slot is mapped to it (Blender: jiggle_zones[N].resize_slot), linearly
; from jiggle_size_scale_min at slider 0.0 to jiggle_size_scale_max at
; slider 1.0. A zone with no mapped slot (-1) passes its authored base
; through unscaled. Recomputed every Present so a live slider drag takes
; effect immediately; the "_base" value itself is never overwritten.
;
; Slot N = position N among UNMUTED zones (same filter as ll_core.j2's
; register-packing loops and core/detect_export.py's get_active_jiggle_zones
; -- duplicated here rather than imported, see _obj_mode_int's comment above
; on cross-file macro/namespace import).

[CommandListLLJiggleSizeScale_remielleblacklegsnback]
$ll_jiggle_max_offset_slot_0_remielleblacklegsnback = $ll_jiggle_max_offset_slot_0_base_remielleblacklegsnback

$ll_jiggle_max_offset_slot_1_remielleblacklegsnback = $ll_jiggle_max_offset_slot_1_base_remielleblacklegsnback

$ll_jiggle_max_offset_slot_2_remielleblacklegsnback = $ll_jiggle_max_offset_slot_2_base_remielleblacklegsnback

$ll_jiggle_max_offset_slot_3_remielleblacklegsnback = $ll_jiggle_max_offset_slot_3_base_remielleblacklegsnback

$ll_jiggle_max_offset_slot_4_remielleblacklegsnback = $ll_jiggle_max_offset_slot_4_base_remielleblacklegsnback

$ll_jiggle_max_offset_slot_5_remielleblacklegsnback = $ll_jiggle_max_offset_slot_5_base_remielleblacklegsnback

$ll_jiggle_max_offset_slot_6_remielleblacklegsnback = $ll_jiggle_max_offset_slot_6_base_remielleblacklegsnback

$ll_jiggle_max_offset_slot_7_remielleblacklegsnback = $ll_jiggle_max_offset_slot_7_base_remielleblacklegsnback

$ll_jiggle_max_offset_slot_8_remielleblacklegsnback = $ll_jiggle_max_offset_slot_8_base_remielleblacklegsnback

$ll_jiggle_max_offset_slot_9_remielleblacklegsnback = $ll_jiggle_max_offset_slot_9_base_remielleblacklegsnback

$ll_jiggle_max_offset_slot_10_remielleblacklegsnback = $ll_jiggle_max_offset_slot_10_base_remielleblacklegsnback

$ll_jiggle_max_offset_slot_11_remielleblacklegsnback = $ll_jiggle_max_offset_slot_11_base_remielleblacklegsnback


; ============================================================
; Pin shader — copies best hit → PinnedDetectID[0], resets accumulator
; ============================================================

[CustomShaderLLPinDetected]
cs = Resources/IM/rzm_pin_detected.hlsl
x24 = $cursorX
y24 = $cursorY
z24 = $screenW
w24 = $screenH
cs-u0 = ResourceLLDetectID
cs-u1 = ResourceLLPinnedDetectID
cs-u2 = ResourceLLPinnedDetectInfo
dispatch = 1, 1, 1
; The snapshot is read as t67 by the jiggle pass on the next frame.  Do not
; leave it bound as a UAV: simultaneous SRV/UAV binding can remove the device.
post cs-u0 = null
post cs-u1 = null
post cs-u2 = null

[CustomShaderLLLiveCursorPreview]
cs = Resources/IM/rzm_jiggle_cursor_preview.hlsl
cs-t67 = ResourceLLJiggleScreenState
cs-t68 = ResourceLLPinnedDetectInfo
cs-t75 = ResourceLLSwingPivots
cs-t76 = ResourceLLSwingAxisX
cs-t77 = ResourceLLSwingAxisY
cs-u0 = ResourceLLJiggleCursorPreview
; Swing state the hand needs to follow a ROTATING grab point rather than a
; translation (see SwingGrabDisplacement in rzm_jiggle_cursor_preview.hlsl).
; Set here explicitly rather than relying on the jiggle dispatches having
; already written them this frame -- these are global IniParams and the
; ordering between the two is not guaranteed.
x125 = $ll_jiggle_swing_mode_slot_0_remielleblacklegsnback
y125 = $ll_jiggle_swing_mode_slot_1_remielleblacklegsnback
z125 = $ll_jiggle_swing_mode_slot_2_remielleblacklegsnback
w125 = $ll_jiggle_swing_mode_slot_3_remielleblacklegsnback
x126 = $ll_jiggle_swing_mode_slot_4_remielleblacklegsnback
y126 = $ll_jiggle_swing_mode_slot_5_remielleblacklegsnback
z126 = $ll_jiggle_swing_mode_slot_6_remielleblacklegsnback
w126 = $ll_jiggle_swing_mode_slot_7_remielleblacklegsnback
x127 = $ll_jiggle_swing_mode_slot_8_remielleblacklegsnback
y127 = $ll_jiggle_swing_mode_slot_9_remielleblacklegsnback
z127 = $ll_jiggle_swing_mode_slot_10_remielleblacklegsnback
w127 = $ll_jiggle_swing_mode_slot_11_remielleblacklegsnback
x128 = $ll_jiggle_swing_min_a_slot_0_remielleblacklegsnback
y128 = $ll_jiggle_swing_min_a_slot_1_remielleblacklegsnback
z128 = $ll_jiggle_swing_min_a_slot_2_remielleblacklegsnback
w128 = $ll_jiggle_swing_min_a_slot_3_remielleblacklegsnback
x129 = $ll_jiggle_swing_min_a_slot_4_remielleblacklegsnback
y129 = $ll_jiggle_swing_min_a_slot_5_remielleblacklegsnback
z129 = $ll_jiggle_swing_min_a_slot_6_remielleblacklegsnback
w129 = $ll_jiggle_swing_min_a_slot_7_remielleblacklegsnback
x130 = $ll_jiggle_swing_min_a_slot_8_remielleblacklegsnback
y130 = $ll_jiggle_swing_min_a_slot_9_remielleblacklegsnback
z130 = $ll_jiggle_swing_min_a_slot_10_remielleblacklegsnback
w130 = $ll_jiggle_swing_min_a_slot_11_remielleblacklegsnback
x131 = $ll_jiggle_swing_axis_mode_slot_0_remielleblacklegsnback
y131 = $ll_jiggle_swing_axis_mode_slot_1_remielleblacklegsnback
z131 = $ll_jiggle_swing_axis_mode_slot_2_remielleblacklegsnback
w131 = $ll_jiggle_swing_axis_mode_slot_3_remielleblacklegsnback
x132 = $ll_jiggle_swing_axis_mode_slot_4_remielleblacklegsnback
y132 = $ll_jiggle_swing_axis_mode_slot_5_remielleblacklegsnback
z132 = $ll_jiggle_swing_axis_mode_slot_6_remielleblacklegsnback
w132 = $ll_jiggle_swing_axis_mode_slot_7_remielleblacklegsnback
x133 = $ll_jiggle_swing_axis_mode_slot_8_remielleblacklegsnback
y133 = $ll_jiggle_swing_axis_mode_slot_9_remielleblacklegsnback
z133 = $ll_jiggle_swing_axis_mode_slot_10_remielleblacklegsnback
w133 = $ll_jiggle_swing_axis_mode_slot_11_remielleblacklegsnback
; Live axis constraint (Shift/Ctrl). Written wherever the swing registers
; are, rather than relying on Present having run -- IniParams are global
; with no guaranteed ordering between dispatches.
x143 = $ll_jiggle_axis_select_remielleblacklegsnback
x134 = $ll_jiggle_swing_max_a_slot_0_remielleblacklegsnback
y134 = $ll_jiggle_swing_max_a_slot_1_remielleblacklegsnback
z134 = $ll_jiggle_swing_max_a_slot_2_remielleblacklegsnback
w134 = $ll_jiggle_swing_max_a_slot_3_remielleblacklegsnback
x135 = $ll_jiggle_swing_max_a_slot_4_remielleblacklegsnback
y135 = $ll_jiggle_swing_max_a_slot_5_remielleblacklegsnback
z135 = $ll_jiggle_swing_max_a_slot_6_remielleblacklegsnback
w135 = $ll_jiggle_swing_max_a_slot_7_remielleblacklegsnback
x136 = $ll_jiggle_swing_max_a_slot_8_remielleblacklegsnback
y136 = $ll_jiggle_swing_max_a_slot_9_remielleblacklegsnback
z136 = $ll_jiggle_swing_max_a_slot_10_remielleblacklegsnback
w136 = $ll_jiggle_swing_max_a_slot_11_remielleblacklegsnback
x137 = $ll_jiggle_swing_min_b_slot_0_remielleblacklegsnback
y137 = $ll_jiggle_swing_min_b_slot_1_remielleblacklegsnback
z137 = $ll_jiggle_swing_min_b_slot_2_remielleblacklegsnback
w137 = $ll_jiggle_swing_min_b_slot_3_remielleblacklegsnback
x138 = $ll_jiggle_swing_min_b_slot_4_remielleblacklegsnback
y138 = $ll_jiggle_swing_min_b_slot_5_remielleblacklegsnback
z138 = $ll_jiggle_swing_min_b_slot_6_remielleblacklegsnback
w138 = $ll_jiggle_swing_min_b_slot_7_remielleblacklegsnback
x139 = $ll_jiggle_swing_min_b_slot_8_remielleblacklegsnback
y139 = $ll_jiggle_swing_min_b_slot_9_remielleblacklegsnback
z139 = $ll_jiggle_swing_min_b_slot_10_remielleblacklegsnback
w139 = $ll_jiggle_swing_min_b_slot_11_remielleblacklegsnback
x140 = $ll_jiggle_swing_max_b_slot_0_remielleblacklegsnback
y140 = $ll_jiggle_swing_max_b_slot_1_remielleblacklegsnback
z140 = $ll_jiggle_swing_max_b_slot_2_remielleblacklegsnback
w140 = $ll_jiggle_swing_max_b_slot_3_remielleblacklegsnback
x141 = $ll_jiggle_swing_max_b_slot_4_remielleblacklegsnback
y141 = $ll_jiggle_swing_max_b_slot_5_remielleblacklegsnback
z141 = $ll_jiggle_swing_max_b_slot_6_remielleblacklegsnback
w141 = $ll_jiggle_swing_max_b_slot_7_remielleblacklegsnback
x142 = $ll_jiggle_swing_max_b_slot_8_remielleblacklegsnback
y142 = $ll_jiggle_swing_max_b_slot_9_remielleblacklegsnback
z142 = $ll_jiggle_swing_max_b_slot_10_remielleblacklegsnback
w142 = $ll_jiggle_swing_max_b_slot_11_remielleblacklegsnback
dispatch = 1, 1, 1
post cs-t67 = null
post cs-t68 = null
post cs-t75 = null
post cs-t76 = null
post cs-t77 = null
post cs-u0 = null

[CustomShaderLLUpdateScreenJiggle]
local $LLScreenCursorXPast
local $LLScreenCursorYPast
local $LLScreenWasMouseDown

if $isMouseButtonDown == 1
	if $LLScreenWasMouseDown == 0
		$LLScreenCursorXPast = $cursorX
		$LLScreenCursorYPast = $cursorY
	endif
	$LLScreenWasMouseDown = 1
	w67 = 1
else
	$LLScreenWasMouseDown = 0
	$LLScreenCursorXPast = 0
	$LLScreenCursorYPast = 0
	w67 = 0
endif

cs = Resources/IM/rzm_jiggle_screen_state.hlsl
x67 = $LLScreenCursorXPast
y67 = $LLScreenCursorYPast
x68 = 0.25
y68 = 1.0
z68 = 1.5
w68 = 1.0
x69 = $cursorX
y69 = $cursorY
z69 = $screenW
w69 = $screenH
x70 = 0.86
y70 = 0.176
z70 = 0.96
w70 = 0.055
x71 = 0.50
y71 = 1.10
z71 = 1.00
w71 = 0.12
x72 = 0
y72 = 1.0
z72 = $ll_jiggle_mult_strength_remielleblacklegsnback
w72 = $ll_jiggle_mult_spring_remielleblacklegsnback
x73 = $ll_jiggle_mult_damping_remielleblacklegsnback
y73 = 1.00
z73 = $ll_jiggle_grab_depth_pull_remielleblacklegsnback
x97 = $ll_jiggle_release_damping_boost_remielleblacklegsnback
y97 = $ll_jiggle_release_damping_decay_remielleblacklegsnback
x76 = $ll_jiggle_delta_time_remielleblacklegsnback
y76 = $ll_jiggle_sim_speed_remielleblacklegsnback
z76 = $ll_jiggle_max_step_remielleblacklegsnback
x77 = $ll_jiggle_radius_slot_0_remielleblacklegsnback
y77 = $ll_jiggle_radius_slot_1_remielleblacklegsnback
z77 = $ll_jiggle_radius_slot_2_remielleblacklegsnback
w77 = $ll_jiggle_radius_slot_3_remielleblacklegsnback
x78 = $ll_jiggle_radius_slot_4_remielleblacklegsnback
y78 = $ll_jiggle_radius_slot_5_remielleblacklegsnback
z78 = $ll_jiggle_radius_slot_6_remielleblacklegsnback
w78 = $ll_jiggle_radius_slot_7_remielleblacklegsnback
x79 = $ll_jiggle_strength_slot_0_remielleblacklegsnback
y79 = $ll_jiggle_strength_slot_1_remielleblacklegsnback
z79 = $ll_jiggle_strength_slot_2_remielleblacklegsnback
w79 = $ll_jiggle_strength_slot_3_remielleblacklegsnback
x80 = $ll_jiggle_strength_slot_4_remielleblacklegsnback
y80 = $ll_jiggle_strength_slot_5_remielleblacklegsnback
z80 = $ll_jiggle_strength_slot_6_remielleblacklegsnback
w80 = $ll_jiggle_strength_slot_7_remielleblacklegsnback
x81 = $ll_jiggle_max_offset_slot_0_remielleblacklegsnback
y81 = $ll_jiggle_max_offset_slot_1_remielleblacklegsnback
z81 = $ll_jiggle_max_offset_slot_2_remielleblacklegsnback
w81 = $ll_jiggle_max_offset_slot_3_remielleblacklegsnback
x82 = $ll_jiggle_max_offset_slot_4_remielleblacklegsnback
y82 = $ll_jiggle_max_offset_slot_5_remielleblacklegsnback
z82 = $ll_jiggle_max_offset_slot_6_remielleblacklegsnback
w82 = $ll_jiggle_max_offset_slot_7_remielleblacklegsnback
x99 = $ll_jiggle_grabbable_slot_0_remielleblacklegsnback
y99 = $ll_jiggle_grabbable_slot_1_remielleblacklegsnback
z99 = $ll_jiggle_grabbable_slot_2_remielleblacklegsnback
w99 = $ll_jiggle_grabbable_slot_3_remielleblacklegsnback
x100 = $ll_jiggle_grabbable_slot_4_remielleblacklegsnback
y100 = $ll_jiggle_grabbable_slot_5_remielleblacklegsnback
z100 = $ll_jiggle_grabbable_slot_6_remielleblacklegsnback
w100 = $ll_jiggle_grabbable_slot_7_remielleblacklegsnback
x101 = $ll_jiggle_falloff_slot_0_remielleblacklegsnback
y101 = $ll_jiggle_falloff_slot_1_remielleblacklegsnback
z101 = $ll_jiggle_falloff_slot_2_remielleblacklegsnback
w101 = $ll_jiggle_falloff_slot_3_remielleblacklegsnback
x102 = $ll_jiggle_falloff_slot_4_remielleblacklegsnback
y102 = $ll_jiggle_falloff_slot_5_remielleblacklegsnback
z102 = $ll_jiggle_falloff_slot_6_remielleblacklegsnback
w102 = $ll_jiggle_falloff_slot_7_remielleblacklegsnback
x119 = $ll_jiggle_path_mode_slot_0_remielleblacklegsnback
y119 = $ll_jiggle_path_mode_slot_1_remielleblacklegsnback
z119 = $ll_jiggle_path_mode_slot_2_remielleblacklegsnback
w119 = $ll_jiggle_path_mode_slot_3_remielleblacklegsnback
x120 = $ll_jiggle_path_mode_slot_4_remielleblacklegsnback
y120 = $ll_jiggle_path_mode_slot_5_remielleblacklegsnback
z120 = $ll_jiggle_path_mode_slot_6_remielleblacklegsnback
w120 = $ll_jiggle_path_mode_slot_7_remielleblacklegsnback
; Zones 8-11. Registers 103/106/109/112/116/121 (115 belongs to an
; unrelated resize-shapekeys feature -- see LLMEXT_RESIZE.hlsl ORIG_V_COUNT).
x103 = $ll_jiggle_radius_slot_8_remielleblacklegsnback
y103 = $ll_jiggle_radius_slot_9_remielleblacklegsnback
z103 = $ll_jiggle_radius_slot_10_remielleblacklegsnback
w103 = $ll_jiggle_radius_slot_11_remielleblacklegsnback
x106 = $ll_jiggle_strength_slot_8_remielleblacklegsnback
y106 = $ll_jiggle_strength_slot_9_remielleblacklegsnback
z106 = $ll_jiggle_strength_slot_10_remielleblacklegsnback
w106 = $ll_jiggle_strength_slot_11_remielleblacklegsnback
x109 = $ll_jiggle_max_offset_slot_8_remielleblacklegsnback
y109 = $ll_jiggle_max_offset_slot_9_remielleblacklegsnback
z109 = $ll_jiggle_max_offset_slot_10_remielleblacklegsnback
w109 = $ll_jiggle_max_offset_slot_11_remielleblacklegsnback
x112 = $ll_jiggle_grabbable_slot_8_remielleblacklegsnback
y112 = $ll_jiggle_grabbable_slot_9_remielleblacklegsnback
z112 = $ll_jiggle_grabbable_slot_10_remielleblacklegsnback
w112 = $ll_jiggle_grabbable_slot_11_remielleblacklegsnback
x116 = $ll_jiggle_falloff_slot_8_remielleblacklegsnback
y116 = $ll_jiggle_falloff_slot_9_remielleblacklegsnback
z116 = $ll_jiggle_falloff_slot_10_remielleblacklegsnback
w116 = $ll_jiggle_falloff_slot_11_remielleblacklegsnback
x121 = $ll_jiggle_path_mode_slot_8_remielleblacklegsnback
y121 = $ll_jiggle_path_mode_slot_9_remielleblacklegsnback
z121 = $ll_jiggle_path_mode_slot_10_remielleblacklegsnback
w121 = $ll_jiggle_path_mode_slot_11_remielleblacklegsnback
x122 = $ll_jiggle_damping_slot_0_remielleblacklegsnback
y122 = $ll_jiggle_damping_slot_1_remielleblacklegsnback
z122 = $ll_jiggle_damping_slot_2_remielleblacklegsnback
w122 = $ll_jiggle_damping_slot_3_remielleblacklegsnback
x123 = $ll_jiggle_damping_slot_4_remielleblacklegsnback
y123 = $ll_jiggle_damping_slot_5_remielleblacklegsnback
z123 = $ll_jiggle_damping_slot_6_remielleblacklegsnback
w123 = $ll_jiggle_damping_slot_7_remielleblacklegsnback
x124 = $ll_jiggle_damping_slot_8_remielleblacklegsnback
y124 = $ll_jiggle_damping_slot_9_remielleblacklegsnback
z124 = $ll_jiggle_damping_slot_10_remielleblacklegsnback
w124 = $ll_jiggle_damping_slot_11_remielleblacklegsnback
; Per-zone RETURN spring: how fast the zone is pulled back to rest once
; released. Only this dispatch needs it -- rzm_jiggle_screen_state is the solver
; that owns releaseSpring, and the per-component deform pass merely consumes the
; offset it already solved.
x146 = $ll_jiggle_return_spring_slot_0_remielleblacklegsnback
y146 = $ll_jiggle_return_spring_slot_1_remielleblacklegsnback
z146 = $ll_jiggle_return_spring_slot_2_remielleblacklegsnback
w146 = $ll_jiggle_return_spring_slot_3_remielleblacklegsnback
x147 = $ll_jiggle_return_spring_slot_4_remielleblacklegsnback
y147 = $ll_jiggle_return_spring_slot_5_remielleblacklegsnback
z147 = $ll_jiggle_return_spring_slot_6_remielleblacklegsnback
w147 = $ll_jiggle_return_spring_slot_7_remielleblacklegsnback
x148 = $ll_jiggle_return_spring_slot_8_remielleblacklegsnback
y148 = $ll_jiggle_return_spring_slot_9_remielleblacklegsnback
z148 = $ll_jiggle_return_spring_slot_10_remielleblacklegsnback
w148 = $ll_jiggle_return_spring_slot_11_remielleblacklegsnback
x125 = $ll_jiggle_swing_mode_slot_0_remielleblacklegsnback
y125 = $ll_jiggle_swing_mode_slot_1_remielleblacklegsnback
z125 = $ll_jiggle_swing_mode_slot_2_remielleblacklegsnback
w125 = $ll_jiggle_swing_mode_slot_3_remielleblacklegsnback
x126 = $ll_jiggle_swing_mode_slot_4_remielleblacklegsnback
y126 = $ll_jiggle_swing_mode_slot_5_remielleblacklegsnback
z126 = $ll_jiggle_swing_mode_slot_6_remielleblacklegsnback
w126 = $ll_jiggle_swing_mode_slot_7_remielleblacklegsnback
x127 = $ll_jiggle_swing_mode_slot_8_remielleblacklegsnback
y127 = $ll_jiggle_swing_mode_slot_9_remielleblacklegsnback
z127 = $ll_jiggle_swing_mode_slot_10_remielleblacklegsnback
w127 = $ll_jiggle_swing_mode_slot_11_remielleblacklegsnback
x128 = $ll_jiggle_swing_min_a_slot_0_remielleblacklegsnback
y128 = $ll_jiggle_swing_min_a_slot_1_remielleblacklegsnback
z128 = $ll_jiggle_swing_min_a_slot_2_remielleblacklegsnback
w128 = $ll_jiggle_swing_min_a_slot_3_remielleblacklegsnback
x129 = $ll_jiggle_swing_min_a_slot_4_remielleblacklegsnback
y129 = $ll_jiggle_swing_min_a_slot_5_remielleblacklegsnback
z129 = $ll_jiggle_swing_min_a_slot_6_remielleblacklegsnback
w129 = $ll_jiggle_swing_min_a_slot_7_remielleblacklegsnback
x130 = $ll_jiggle_swing_min_a_slot_8_remielleblacklegsnback
y130 = $ll_jiggle_swing_min_a_slot_9_remielleblacklegsnback
z130 = $ll_jiggle_swing_min_a_slot_10_remielleblacklegsnback
w130 = $ll_jiggle_swing_min_a_slot_11_remielleblacklegsnback
x134 = $ll_jiggle_swing_max_a_slot_0_remielleblacklegsnback
y134 = $ll_jiggle_swing_max_a_slot_1_remielleblacklegsnback
z134 = $ll_jiggle_swing_max_a_slot_2_remielleblacklegsnback
w134 = $ll_jiggle_swing_max_a_slot_3_remielleblacklegsnback
x135 = $ll_jiggle_swing_max_a_slot_4_remielleblacklegsnback
y135 = $ll_jiggle_swing_max_a_slot_5_remielleblacklegsnback
z135 = $ll_jiggle_swing_max_a_slot_6_remielleblacklegsnback
w135 = $ll_jiggle_swing_max_a_slot_7_remielleblacklegsnback
x136 = $ll_jiggle_swing_max_a_slot_8_remielleblacklegsnback
y136 = $ll_jiggle_swing_max_a_slot_9_remielleblacklegsnback
z136 = $ll_jiggle_swing_max_a_slot_10_remielleblacklegsnback
w136 = $ll_jiggle_swing_max_a_slot_11_remielleblacklegsnback
x137 = $ll_jiggle_swing_min_b_slot_0_remielleblacklegsnback
y137 = $ll_jiggle_swing_min_b_slot_1_remielleblacklegsnback
z137 = $ll_jiggle_swing_min_b_slot_2_remielleblacklegsnback
w137 = $ll_jiggle_swing_min_b_slot_3_remielleblacklegsnback
x138 = $ll_jiggle_swing_min_b_slot_4_remielleblacklegsnback
y138 = $ll_jiggle_swing_min_b_slot_5_remielleblacklegsnback
z138 = $ll_jiggle_swing_min_b_slot_6_remielleblacklegsnback
w138 = $ll_jiggle_swing_min_b_slot_7_remielleblacklegsnback
x139 = $ll_jiggle_swing_min_b_slot_8_remielleblacklegsnback
y139 = $ll_jiggle_swing_min_b_slot_9_remielleblacklegsnback
z139 = $ll_jiggle_swing_min_b_slot_10_remielleblacklegsnback
w139 = $ll_jiggle_swing_min_b_slot_11_remielleblacklegsnback
x140 = $ll_jiggle_swing_max_b_slot_0_remielleblacklegsnback
y140 = $ll_jiggle_swing_max_b_slot_1_remielleblacklegsnback
z140 = $ll_jiggle_swing_max_b_slot_2_remielleblacklegsnback
w140 = $ll_jiggle_swing_max_b_slot_3_remielleblacklegsnback
x141 = $ll_jiggle_swing_max_b_slot_4_remielleblacklegsnback
y141 = $ll_jiggle_swing_max_b_slot_5_remielleblacklegsnback
z141 = $ll_jiggle_swing_max_b_slot_6_remielleblacklegsnback
w141 = $ll_jiggle_swing_max_b_slot_7_remielleblacklegsnback
x142 = $ll_jiggle_swing_max_b_slot_8_remielleblacklegsnback
y142 = $ll_jiggle_swing_max_b_slot_9_remielleblacklegsnback
z142 = $ll_jiggle_swing_max_b_slot_10_remielleblacklegsnback
w142 = $ll_jiggle_swing_max_b_slot_11_remielleblacklegsnback
x131 = $ll_jiggle_swing_axis_mode_slot_0_remielleblacklegsnback
y131 = $ll_jiggle_swing_axis_mode_slot_1_remielleblacklegsnback
z131 = $ll_jiggle_swing_axis_mode_slot_2_remielleblacklegsnback
w131 = $ll_jiggle_swing_axis_mode_slot_3_remielleblacklegsnback
x132 = $ll_jiggle_swing_axis_mode_slot_4_remielleblacklegsnback
y132 = $ll_jiggle_swing_axis_mode_slot_5_remielleblacklegsnback
z132 = $ll_jiggle_swing_axis_mode_slot_6_remielleblacklegsnback
w132 = $ll_jiggle_swing_axis_mode_slot_7_remielleblacklegsnback
x133 = $ll_jiggle_swing_axis_mode_slot_8_remielleblacklegsnback
y133 = $ll_jiggle_swing_axis_mode_slot_9_remielleblacklegsnback
z133 = $ll_jiggle_swing_axis_mode_slot_10_remielleblacklegsnback
w133 = $ll_jiggle_swing_axis_mode_slot_11_remielleblacklegsnback
; Live axis constraint (Shift/Ctrl). Written wherever the swing registers
; are, rather than relying on Present having run -- IniParams are global
; with no guaranteed ordering between dispatches.
x143 = $ll_jiggle_axis_select_remielleblacklegsnback
x84 = $ll_jiggle_poke_sign_remielleblacklegsnback
y84 = $ll_jiggle_poke_hold_mult_remielleblacklegsnback
z84 = $ll_jiggle_poke_hold_frames_remielleblacklegsnback
w84 = $ll_jiggle_charge_sign_remielleblacklegsnback
cs-t71 = null
cs-t67 = ResourceLLPinnedDetectInfo
cs-u0 = ResourceLLJiggleScreenState
cs-u1 = ResourceLLPathProgressState
dispatch = 1, 1, 1
post cs-u0 = null
post cs-u1 = null
post cs-t67 = null

[CustomShaderLLJiggleCursor]
vs = Resources/IM/rzm_jiggle_cursor.hlsl
ps = Resources/IM/rzm_jiggle_cursor.hlsl
blend = ADD SRC_ALPHA INV_SRC_ALPHA
cull = none
topology = triangle_strip
o0 = set_viewport bb
vs-t67 = ResourceLLJiggleCursorPreview
Draw = 4, 0
post vs-t67 = null

[CustomShaderLLPresentHand]
vs = Resources/IM/rzm_jiggle_hand.hlsl
ps = Resources/IM/rzm_jiggle_hand.hlsl
blend = ADD SRC_ALPHA INV_SRC_ALPHA
cull = none
topology = triangle_list
o0 = set_viewport bb
vs-t67 = ResourceLLJiggleCursorPreview
vs-t68 = ResourceLLJiggleScreenState
vs-t69 = ResourceLLHandNoActionNormal
x83 = $ll_jiggle_hand_surface_clip_remielleblacklegsnback
y83 = $ll_jiggle_hand_surface_lift_remielleblacklegsnback
z83 = $ll_jiggle_hand_surface_softness_remielleblacklegsnback
x89 = $ll_jiggle_hand_center_x_remielleblacklegsnback
y89 = $ll_jiggle_hand_center_y_remielleblacklegsnback
z89 = $ll_jiggle_hand_center_z_remielleblacklegsnback
x90 = $ll_jiggle_hand_scale_remielleblacklegsnback
y90 = $ll_jiggle_hand_opacity_remielleblacklegsnback
x91 = $ll_jiggle_lmb_hold_fraction_remielleblacklegsnback / $ll_jiggle_hand_windup_time_remielleblacklegsnback
y91 = time
z91 = $ll_jiggle_rmb_hold_fraction_remielleblacklegsnback / $ll_jiggle_hand_rmb_windup_time_remielleblacklegsnback
x92 = $ll_jiggle_hand_tilt_min_remielleblacklegsnback
y92 = $ll_jiggle_hand_tilt_rmb_min_remielleblacklegsnback
z92 = $ll_jiggle_hand_tilt_max_deg_remielleblacklegsnback
w92 = $ll_jiggle_hand_tilt_rmb_max_deg_remielleblacklegsnback
x93 = $ll_jiggle_hand_vibrate_threshold_remielleblacklegsnback
y93 = $ll_jiggle_hand_vibrate_period_slow_remielleblacklegsnback
z93 = $ll_jiggle_hand_vibrate_period_fast_remielleblacklegsnback
w93 = $ll_jiggle_hand_vibrate_amplitude_remielleblacklegsnback
x94 = $ll_jiggle_hand_upright_max_deg_remielleblacklegsnback
z94 = $ll_jiggle_hand_tilt_grab_max_deg_remielleblacklegsnback
x95 = $ll_jiggle_hand_reference_height_remielleblacklegsnback
y98 = 0.0
vb0 = ResourceLLHandNoActionVB
ib = ResourceLLHandNoActionIB
; HAND_EXP.blend: 254 authored quads -> 508 triangles -> 1524 indices.
DrawIndexed = 1524, 0, 0
post vs-t67 = null
post vs-t68 = null
post vs-t69 = null
post vb0 = null
post ib = null

[CustomShaderLLPresentHandAction]
vs = Resources/IM/rzm_jiggle_hand.hlsl
ps = Resources/IM/rzm_jiggle_hand.hlsl
blend = ADD SRC_ALPHA INV_SRC_ALPHA
cull = none
topology = triangle_list
o0 = set_viewport bb
vs-t67 = ResourceLLJiggleCursorPreview
vs-t68 = ResourceLLJiggleScreenState
vs-t69 = ResourceLLHandActionNormal
x83 = $ll_jiggle_hand_surface_clip_remielleblacklegsnback
y83 = $ll_jiggle_hand_surface_lift_remielleblacklegsnback
z83 = $ll_jiggle_hand_surface_softness_remielleblacklegsnback
x89 = $ll_jiggle_hand_center_x_remielleblacklegsnback
y89 = $ll_jiggle_hand_center_y_remielleblacklegsnback
z89 = $ll_jiggle_hand_center_z_remielleblacklegsnback
x90 = $ll_jiggle_hand_scale_remielleblacklegsnback
y90 = $ll_jiggle_hand_opacity_remielleblacklegsnback
x91 = $ll_jiggle_lmb_hold_fraction_remielleblacklegsnback / $ll_jiggle_hand_windup_time_remielleblacklegsnback
y91 = time
z91 = $ll_jiggle_rmb_hold_fraction_remielleblacklegsnback / $ll_jiggle_hand_rmb_windup_time_remielleblacklegsnback
x92 = $ll_jiggle_hand_tilt_min_remielleblacklegsnback
y92 = $ll_jiggle_hand_tilt_rmb_min_remielleblacklegsnback
z92 = $ll_jiggle_hand_tilt_max_deg_remielleblacklegsnback
w92 = $ll_jiggle_hand_tilt_rmb_max_deg_remielleblacklegsnback
x93 = $ll_jiggle_hand_vibrate_threshold_remielleblacklegsnback
y93 = $ll_jiggle_hand_vibrate_period_slow_remielleblacklegsnback
z93 = $ll_jiggle_hand_vibrate_period_fast_remielleblacklegsnback
w93 = $ll_jiggle_hand_vibrate_amplitude_remielleblacklegsnback
x94 = $ll_jiggle_hand_upright_max_deg_remielleblacklegsnback
z94 = $ll_jiggle_hand_tilt_grab_max_deg_remielleblacklegsnback
x95 = $ll_jiggle_hand_reference_height_remielleblacklegsnback
y98 = 0.0
vb0 = ResourceLLHandActionVB
ib = ResourceLLHandActionIB
DrawIndexed = 1524, 0, 0
post vs-t67 = null
post vs-t68 = null
post vs-t69 = null
post vb0 = null
post ib = null

; Inverted-hull-style outline: same VS/PS as the two blocks above, just with
; the outline pass flag (y98) set to 1.0 -- pushes each vertex outward in
; screen space along its baked normal by a fixed pixel width and renders it
; flat instead of shaded. Drawn first (see [Present]) so it lands behind the
; real hand and only its rim stays visible past the real hand's edges.

[CustomShaderLLPresentHandOutline]
vs = Resources/IM/rzm_jiggle_hand.hlsl
ps = Resources/IM/rzm_jiggle_hand.hlsl
blend = ADD SRC_ALPHA INV_SRC_ALPHA
cull = none
topology = triangle_list
o0 = set_viewport bb
vs-t67 = ResourceLLJiggleCursorPreview
vs-t68 = ResourceLLJiggleScreenState
vs-t69 = ResourceLLHandNoActionNormal
x83 = $ll_jiggle_hand_surface_clip_remielleblacklegsnback
y83 = $ll_jiggle_hand_surface_lift_remielleblacklegsnback
z83 = $ll_jiggle_hand_surface_softness_remielleblacklegsnback
x89 = $ll_jiggle_hand_center_x_remielleblacklegsnback
y89 = $ll_jiggle_hand_center_y_remielleblacklegsnback
z89 = $ll_jiggle_hand_center_z_remielleblacklegsnback
x90 = $ll_jiggle_hand_scale_remielleblacklegsnback
y90 = $ll_jiggle_hand_opacity_remielleblacklegsnback
x91 = $ll_jiggle_lmb_hold_fraction_remielleblacklegsnback / $ll_jiggle_hand_windup_time_remielleblacklegsnback
y91 = time
z91 = $ll_jiggle_rmb_hold_fraction_remielleblacklegsnback / $ll_jiggle_hand_rmb_windup_time_remielleblacklegsnback
x92 = $ll_jiggle_hand_tilt_min_remielleblacklegsnback
y92 = $ll_jiggle_hand_tilt_rmb_min_remielleblacklegsnback
z92 = $ll_jiggle_hand_tilt_max_deg_remielleblacklegsnback
w92 = $ll_jiggle_hand_tilt_rmb_max_deg_remielleblacklegsnback
x93 = $ll_jiggle_hand_vibrate_threshold_remielleblacklegsnback
y93 = $ll_jiggle_hand_vibrate_period_slow_remielleblacklegsnback
z93 = $ll_jiggle_hand_vibrate_period_fast_remielleblacklegsnback
w93 = $ll_jiggle_hand_vibrate_amplitude_remielleblacklegsnback
x94 = $ll_jiggle_hand_upright_max_deg_remielleblacklegsnback
z94 = $ll_jiggle_hand_tilt_grab_max_deg_remielleblacklegsnback
x95 = $ll_jiggle_hand_reference_height_remielleblacklegsnback
x98 = $ll_jiggle_hand_outline_width_remielleblacklegsnback
y98 = 1.0
z98 = $ll_jiggle_hand_outline_opacity_remielleblacklegsnback
vb0 = ResourceLLHandNoActionVB
ib = ResourceLLHandNoActionIB
DrawIndexed = 1524, 0, 0
post vs-t67 = null
post vs-t68 = null
post vs-t69 = null
post vb0 = null
post ib = null

[CustomShaderLLPresentHandActionOutline]
vs = Resources/IM/rzm_jiggle_hand.hlsl
ps = Resources/IM/rzm_jiggle_hand.hlsl
blend = ADD SRC_ALPHA INV_SRC_ALPHA
cull = none
topology = triangle_list
o0 = set_viewport bb
vs-t67 = ResourceLLJiggleCursorPreview
vs-t68 = ResourceLLJiggleScreenState
vs-t69 = ResourceLLHandActionNormal
x83 = $ll_jiggle_hand_surface_clip_remielleblacklegsnback
y83 = $ll_jiggle_hand_surface_lift_remielleblacklegsnback
z83 = $ll_jiggle_hand_surface_softness_remielleblacklegsnback
x89 = $ll_jiggle_hand_center_x_remielleblacklegsnback
y89 = $ll_jiggle_hand_center_y_remielleblacklegsnback
z89 = $ll_jiggle_hand_center_z_remielleblacklegsnback
x90 = $ll_jiggle_hand_scale_remielleblacklegsnback
y90 = $ll_jiggle_hand_opacity_remielleblacklegsnback
x91 = $ll_jiggle_lmb_hold_fraction_remielleblacklegsnback / $ll_jiggle_hand_windup_time_remielleblacklegsnback
y91 = time
z91 = $ll_jiggle_rmb_hold_fraction_remielleblacklegsnback / $ll_jiggle_hand_rmb_windup_time_remielleblacklegsnback
x92 = $ll_jiggle_hand_tilt_min_remielleblacklegsnback
y92 = $ll_jiggle_hand_tilt_rmb_min_remielleblacklegsnback
z92 = $ll_jiggle_hand_tilt_max_deg_remielleblacklegsnback
w92 = $ll_jiggle_hand_tilt_rmb_max_deg_remielleblacklegsnback
x93 = $ll_jiggle_hand_vibrate_threshold_remielleblacklegsnback
y93 = $ll_jiggle_hand_vibrate_period_slow_remielleblacklegsnback
z93 = $ll_jiggle_hand_vibrate_period_fast_remielleblacklegsnback
w93 = $ll_jiggle_hand_vibrate_amplitude_remielleblacklegsnback
x94 = $ll_jiggle_hand_upright_max_deg_remielleblacklegsnback
z94 = $ll_jiggle_hand_tilt_grab_max_deg_remielleblacklegsnback
x95 = $ll_jiggle_hand_reference_height_remielleblacklegsnback
x98 = $ll_jiggle_hand_outline_width_remielleblacklegsnback
y98 = 1.0
z98 = $ll_jiggle_hand_outline_opacity_remielleblacklegsnback
vb0 = ResourceLLHandActionVB
ib = ResourceLLHandActionIB
DrawIndexed = 1524, 0, 0
post vs-t67 = null
post vs-t68 = null
post vs-t69 = null
post vb0 = null
post ib = null

[CustomShaderLLUpdateJiggleCursorPreview]
cs = Resources/IM/rzm_jiggle_cursor_preview.hlsl
cs-t67 = ResourceLLJiggleScreenState
cs-t68 = ResourceLLPinnedDetectInfo
cs-t75 = ResourceLLSwingPivots
cs-t76 = ResourceLLSwingAxisX
cs-t77 = ResourceLLSwingAxisY
; Where the grabbed vertex actually ended up this frame -- the hand reads this
; instead of reconstructing the swing rotation. Written by the jiggle dispatch
; earlier in the frame, so Present consumes a completed value with no lag.
cs-t78 = ResourceLLSwingGrabDelta
cs-u0 = ResourceLLJiggleCursorPreview
; MUST be released: next frame the jiggle dispatch binds this same resource as a
; UAV (cs-u3), and D3D11 cannot hold it as SRV and UAV at once. The other
; bindings in this block are read-only elsewhere, which is why they get away
; without a post-null.
post cs-t78 = null
; Swing state the hand needs to follow a ROTATING grab point rather than a
; translation (see SwingGrabDisplacement in rzm_jiggle_cursor_preview.hlsl).
; Set here explicitly rather than relying on the jiggle dispatches having
; already written them this frame -- these are global IniParams and the
; ordering between the two is not guaranteed.
x125 = $ll_jiggle_swing_mode_slot_0_remielleblacklegsnback
y125 = $ll_jiggle_swing_mode_slot_1_remielleblacklegsnback
z125 = $ll_jiggle_swing_mode_slot_2_remielleblacklegsnback
w125 = $ll_jiggle_swing_mode_slot_3_remielleblacklegsnback
x126 = $ll_jiggle_swing_mode_slot_4_remielleblacklegsnback
y126 = $ll_jiggle_swing_mode_slot_5_remielleblacklegsnback
z126 = $ll_jiggle_swing_mode_slot_6_remielleblacklegsnback
w126 = $ll_jiggle_swing_mode_slot_7_remielleblacklegsnback
x127 = $ll_jiggle_swing_mode_slot_8_remielleblacklegsnback
y127 = $ll_jiggle_swing_mode_slot_9_remielleblacklegsnback
z127 = $ll_jiggle_swing_mode_slot_10_remielleblacklegsnback
w127 = $ll_jiggle_swing_mode_slot_11_remielleblacklegsnback
x128 = $ll_jiggle_swing_min_a_slot_0_remielleblacklegsnback
y128 = $ll_jiggle_swing_min_a_slot_1_remielleblacklegsnback
z128 = $ll_jiggle_swing_min_a_slot_2_remielleblacklegsnback
w128 = $ll_jiggle_swing_min_a_slot_3_remielleblacklegsnback
x129 = $ll_jiggle_swing_min_a_slot_4_remielleblacklegsnback
y129 = $ll_jiggle_swing_min_a_slot_5_remielleblacklegsnback
z129 = $ll_jiggle_swing_min_a_slot_6_remielleblacklegsnback
w129 = $ll_jiggle_swing_min_a_slot_7_remielleblacklegsnback
x130 = $ll_jiggle_swing_min_a_slot_8_remielleblacklegsnback
y130 = $ll_jiggle_swing_min_a_slot_9_remielleblacklegsnback
z130 = $ll_jiggle_swing_min_a_slot_10_remielleblacklegsnback
w130 = $ll_jiggle_swing_min_a_slot_11_remielleblacklegsnback
x131 = $ll_jiggle_swing_axis_mode_slot_0_remielleblacklegsnback
y131 = $ll_jiggle_swing_axis_mode_slot_1_remielleblacklegsnback
z131 = $ll_jiggle_swing_axis_mode_slot_2_remielleblacklegsnback
w131 = $ll_jiggle_swing_axis_mode_slot_3_remielleblacklegsnback
x132 = $ll_jiggle_swing_axis_mode_slot_4_remielleblacklegsnback
y132 = $ll_jiggle_swing_axis_mode_slot_5_remielleblacklegsnback
z132 = $ll_jiggle_swing_axis_mode_slot_6_remielleblacklegsnback
w132 = $ll_jiggle_swing_axis_mode_slot_7_remielleblacklegsnback
x133 = $ll_jiggle_swing_axis_mode_slot_8_remielleblacklegsnback
y133 = $ll_jiggle_swing_axis_mode_slot_9_remielleblacklegsnback
z133 = $ll_jiggle_swing_axis_mode_slot_10_remielleblacklegsnback
w133 = $ll_jiggle_swing_axis_mode_slot_11_remielleblacklegsnback
; Live axis constraint (Shift/Ctrl). Written wherever the swing registers
; are, rather than relying on Present having run -- IniParams are global
; with no guaranteed ordering between dispatches.
x143 = $ll_jiggle_axis_select_remielleblacklegsnback
x134 = $ll_jiggle_swing_max_a_slot_0_remielleblacklegsnback
y134 = $ll_jiggle_swing_max_a_slot_1_remielleblacklegsnback
z134 = $ll_jiggle_swing_max_a_slot_2_remielleblacklegsnback
w134 = $ll_jiggle_swing_max_a_slot_3_remielleblacklegsnback
x135 = $ll_jiggle_swing_max_a_slot_4_remielleblacklegsnback
y135 = $ll_jiggle_swing_max_a_slot_5_remielleblacklegsnback
z135 = $ll_jiggle_swing_max_a_slot_6_remielleblacklegsnback
w135 = $ll_jiggle_swing_max_a_slot_7_remielleblacklegsnback
x136 = $ll_jiggle_swing_max_a_slot_8_remielleblacklegsnback
y136 = $ll_jiggle_swing_max_a_slot_9_remielleblacklegsnback
z136 = $ll_jiggle_swing_max_a_slot_10_remielleblacklegsnback
w136 = $ll_jiggle_swing_max_a_slot_11_remielleblacklegsnback
x137 = $ll_jiggle_swing_min_b_slot_0_remielleblacklegsnback
y137 = $ll_jiggle_swing_min_b_slot_1_remielleblacklegsnback
z137 = $ll_jiggle_swing_min_b_slot_2_remielleblacklegsnback
w137 = $ll_jiggle_swing_min_b_slot_3_remielleblacklegsnback
x138 = $ll_jiggle_swing_min_b_slot_4_remielleblacklegsnback
y138 = $ll_jiggle_swing_min_b_slot_5_remielleblacklegsnback
z138 = $ll_jiggle_swing_min_b_slot_6_remielleblacklegsnback
w138 = $ll_jiggle_swing_min_b_slot_7_remielleblacklegsnback
x139 = $ll_jiggle_swing_min_b_slot_8_remielleblacklegsnback
y139 = $ll_jiggle_swing_min_b_slot_9_remielleblacklegsnback
z139 = $ll_jiggle_swing_min_b_slot_10_remielleblacklegsnback
w139 = $ll_jiggle_swing_min_b_slot_11_remielleblacklegsnback
x140 = $ll_jiggle_swing_max_b_slot_0_remielleblacklegsnback
y140 = $ll_jiggle_swing_max_b_slot_1_remielleblacklegsnback
z140 = $ll_jiggle_swing_max_b_slot_2_remielleblacklegsnback
w140 = $ll_jiggle_swing_max_b_slot_3_remielleblacklegsnback
x141 = $ll_jiggle_swing_max_b_slot_4_remielleblacklegsnback
y141 = $ll_jiggle_swing_max_b_slot_5_remielleblacklegsnback
z141 = $ll_jiggle_swing_max_b_slot_6_remielleblacklegsnback
w141 = $ll_jiggle_swing_max_b_slot_7_remielleblacklegsnback
x142 = $ll_jiggle_swing_max_b_slot_8_remielleblacklegsnback
y142 = $ll_jiggle_swing_max_b_slot_9_remielleblacklegsnback
z142 = $ll_jiggle_swing_max_b_slot_10_remielleblacklegsnback
w142 = $ll_jiggle_swing_max_b_slot_11_remielleblacklegsnback
dispatch = 1, 1, 1
post cs-t67 = null
post cs-t68 = null
post cs-t75 = null
post cs-t76 = null
post cs-t77 = null
post cs-u0 = null

[CustomShaderLLPinComponentRemielleBlackLegsnBack]
cs = Resources/IM/rzm_pin_detected.hlsl
cs-u0 = ResourceLLComponentDetect_RemielleBlackLegsnBack
cs-u1 = ResourceLLPinnedComponentID_RemielleBlackLegsnBack
cs-u2 = ResourceLLPinnedComponentInfo_RemielleBlackLegsnBack
dispatch = 1, 1, 1
post cs-u0 = null
post cs-u1 = null
post cs-u2 = null

[CustomShaderLLPinComponentRemielleBlackHair]
cs = Resources/IM/rzm_pin_detected.hlsl
cs-u0 = ResourceLLComponentDetect_RemielleBlackHair
cs-u1 = ResourceLLPinnedComponentID_RemielleBlackHair
cs-u2 = ResourceLLPinnedComponentInfo_RemielleBlackHair
dispatch = 1, 1, 1
post cs-u0 = null
post cs-u1 = null
post cs-u2 = null

[CustomShaderLLPinComponentRemielleBlackBody]
cs = Resources/IM/rzm_pin_detected.hlsl
cs-u0 = ResourceLLComponentDetect_RemielleBlackBody
cs-u1 = ResourceLLPinnedComponentID_RemielleBlackBody
cs-u2 = ResourceLLPinnedComponentInfo_RemielleBlackBody
dispatch = 1, 1, 1
post cs-u0 = null
post cs-u1 = null
post cs-u2 = null


; Throttled store (CPU readback). Velina uses frame counter; we use time.

[CommandListLLPinDetected]
local $ll_detect_next_time
local $ll_detect_interval = 0.25

; One sample per Present, immediately before the single global jiggle update.
; Do not let a pause/hitch turn into an unbounded simulation step.
if $ll_jiggle_prev_time_remielleblacklegsnback == 0
	$ll_jiggle_delta_time_remielleblacklegsnback = 0.0166667
else
	; WRONG, AND LOAD-BEARING -- do not "fix" without re-tuning everything.
	; `time` is in SECONDS, not minutes (see the settle deadline below, and
	; help.ini's `time + 2.0` two-second notification), so this * 60 makes the
	; step 60x too large and the clamp below pins it at 0.100 on any framerate
	; above ~10fps. The simulation therefore advances a FIXED 0.100s per frame,
	; which is accidentally framerate-independent but ~6x real time at 60fps --
	; which is why the stock release spring of 0.055 behaves as briskly as it
	; does, and why Return Spring needs values around 12 to read as cloth.
	; Every spring/damping default and every zone anyone has tuned sits on top
	; of this. Correcting it silently re-times all of them.
	$ll_jiggle_delta_time_remielleblacklegsnback = (time - $ll_jiggle_prev_time_remielleblacklegsnback) * 60.0
	if $ll_jiggle_delta_time_remielleblacklegsnback > 0.100
		$ll_jiggle_delta_time_remielleblacklegsnback = 0.100
	elif $ll_jiggle_delta_time_remielleblacklegsnback < 0.001
		$ll_jiggle_delta_time_remielleblacklegsnback = 0.001
	endif
endif
$ll_jiggle_prev_time_remielleblacklegsnback = time

if $isMouseButtonDown == 1
	$ll_detect_next_time = time
endif

if $inputMode == 0 && $ll_jiggle_mode_remielleblacklegsnback == 1
	if $hoveredID > 0
		$Detected_remielleblacklegsnback = -1
		$ObjectDetectAllowed_remielleblacklegsnback = 0
	else
		$ObjectDetectAllowed_remielleblacklegsnback = 1
		if $ll_jiggle_debug_dump == 1
			dump = ResourceLLDetectID
		endif
		run = CustomShaderLLPinDetected
		run = CustomShaderLLPinComponentRemielleBlackLegsnBack
		run = CustomShaderLLPinComponentRemielleBlackHair
		run = CustomShaderLLPinComponentRemielleBlackBody
		run = CustomShaderLLUpdateScreenJiggle
		if $ll_jiggle_debug_dump == 1
			dump = ResourceLLPinnedDetectInfo
			dump = ResourceLLPinnedDetectID
			dump = ResourceLLJiggleScreenState
		endif
		if (time) >= $ll_detect_next_time
			store = $Detected_remielleblacklegsnback, ResourceLLPinnedDetectID, 0
			$ll_detect_next_time = time + $ll_detect_interval
		endif
	endif
elif $inputMode == 0 && $ll_jiggle_settling_remielleblacklegsnback == 1
	; Modifier released but the zone is still moving: keep SOLVING so the
	; release oscillation plays out. Deliberately the solver only -- no
	; detection, no pinning, no hand. Nothing can be newly grabbed here, and
	; with the buttons up the solver just decays what it already holds.
	run = CustomShaderLLUpdateScreenJiggle
else
	$Detected_remielleblacklegsnback = -1
	$ObjectDetectAllowed_remielleblacklegsnback = 0
endif

; Cursor + screen size. MUST convert to PIXEL space (jiggle uses px delta / screen).
; The manager always publishes identity transform first. Invalid/NaN/over-8K
; dimensions are never allowed to produce an offset or resize.

[CommandListLLViewportUpdate]
$ll_viewport_valid = 0
$ll_viewport_offset_x = 0
$ll_viewport_offset_y = 0
$ll_viewport_scale_x = 1
$ll_viewport_scale_y = 1
$screenW = 1
$screenH = 1
if window_width > 0 && window_height > 0 && window_width <= 8192 && window_height <= 8192
	$screenW = window_width
	$screenH = window_height
	$ll_viewport_valid = 1
elif rt_width > 0 && rt_height > 0 && rt_width <= 8192 && rt_height <= 8192
	$screenW = rt_width
	$screenH = rt_height
	$ll_viewport_valid = 1
elif res_width > 0 && res_height > 0 && res_width <= 8192 && res_height <= 8192
	$screenW = res_width
	$screenH = res_height
	$ll_viewport_valid = 1
endif

[CommandListLLCursorUpdate]
run = CommandListLLViewportUpdate
if $inputMode == 0 && $ll_viewport_valid == 1
	if cursor_x > 0 && cursor_y > 0 && cursor_x < 1 && cursor_y < 1
		$cursorX = cursor_x
		$cursorY = 1.0 - cursor_y
	elif cursor_window_x > 0 && cursor_window_y > 0 && cursor_window_x < 1 && cursor_window_y < 1
		$cursorX = cursor_window_x
		$cursorY = 1.0 - cursor_window_y
	elif cursor_screen_x >= 0 && cursor_screen_y >= 0 && cursor_screen_x <= $screenW && cursor_screen_y <= $screenH
		$cursorX = cursor_screen_x / $screenW
		$cursorY = 1.0 - cursor_screen_y / $screenH
	else
		$cursorX = -1
		$cursorY = -1
	endif
endif
if $ll_viewport_valid == 0
	$cursorX = -1
	$cursorY = -1
endif
; Normalized UV → pixels (RZMenu CommandListComputeDimensions)
if $inputMode == 0
	$cursorX = $cursorX * $screenW
	$cursorY = $cursorY * $screenH
endif
x24 = $cursorX
y24 = $cursorY
z24 = $screenW
w24 = $screenH

; Present: pin first (pre), then refresh cursor for next frame.
; ObjectDetectAllowed is set inside Pin CL so next frame's IB path can bake/detect.

[Present]
; Fresh input reduction at the frame boundary.  No x/y/z/w value from an
; earlier draw is trusted here; this Present writes the complete input truth
; immediately before Pin/ScreenState consume it.
run = CommandListLLJiggleSizeScale_remielleblacklegsnback
$isMouseButtonDown = 0
$ll_jiggle_poke_sign_remielleblacklegsnback = 0
; NONE means no modifier gate at all -- always "held". Computed once so the
; combo/poke/charge triggers below don't each need their own NONE-vs-
; modifier branch (this used to be duplicated per trigger).
$ll_jiggle_modifier_ok_remielleblacklegsnback = $ll_jiggle_modifier_down_remielleblacklegsnback
; Settle window: push the deadline forward every frame the modifier is held, so
; letting go leaves 2.00s of simulation still to run and a release
; oscillation plays out instead of being cut off mid-swing. $ll_jiggle_mode
; gates the SOLVER and the deform dispatch, not just the hand.
;
; A timer rather than a real motion threshold, deliberately: the solver already
; stops itself once motion falls below its own threshold (the `alive` test in
; rzm_jiggle_screen_state.hlsl), so this only has to stay open long enough to
; let that happen. Reading actual motion back would need a per-frame CPU
; `store`, the one thing throttled to 4Hz elsewhere for being costly.
; Overshooting is nearly free -- a settled zone dispatches and applies zero.
;
; `time` is in SECONDS. Every other deadline in this file agrees --
; $ll_detect_interval 0.25 is a 250ms throttle, the viewport probe 0.50 is
; 500ms, help.ini's notification_timeout is time + 2.0 for a two second
; notice. v0.5.7.1 divided by 60 on the strength of the "time is in minutes"
; comment on $ll_jiggle_delta_time below and turned this window into 33ms,
; which looked exactly like the bug it was meant to fix. That comment is
; wrong; see the changelog.
if $ll_jiggle_mode_remielleblacklegsnback == 1
	$ll_jiggle_settle_until_remielleblacklegsnback = time + 2.000000
endif
$ll_jiggle_settling_remielleblacklegsnback = 0
if time < $ll_jiggle_settle_until_remielleblacklegsnback
	$ll_jiggle_settling_remielleblacklegsnback = 1
endif
if $ll_jiggle_modifier_ok_remielleblacklegsnback == 1
	if ($ll_jiggle_lmb_down_remielleblacklegsnback == 1 && $ll_jiggle_rmb_down_remielleblacklegsnback == 1) || $ll_jiggle_x_down_remielleblacklegsnback == 1
		$isMouseButtonDown = 1
	endif
endif
if $isMouseButtonDown == 1
	$ll_jiggle_combo_active_remielleblacklegsnback = 1
endif
; Swing axis constraint: 0 = both (cone), 1 = axis A only, 2 = axis B only.
; Holding both cancels out to the cone rather than picking one arbitrarily.
; Publish LAST frame's visibility bits, then reset for this frame. Present runs
; after the draws that set them, so the detector consumes a complete frame --
; one frame of lag on a toggle change, and no draw/dispatch ordering hazard.
x144 = $ll_vis_0_remielleblacklegsnback
y144 = $ll_vis_1_remielleblacklegsnback
z144 = $ll_vis_2_remielleblacklegsnback
w144 = $ll_vis_3_remielleblacklegsnback
x145 = $ll_hit_test_visible_remielleblacklegsnback
$ll_vis_0_remielleblacklegsnback = 0
$ll_vis_1_remielleblacklegsnback = 0
$ll_vis_2_remielleblacklegsnback = 0
$ll_vis_3_remielleblacklegsnback = 0
; DISABLED in v0.5.6.14 by request -- the Shift/Ctrl single-axis constraint was
; not behaving correctly in game. Pinned to 0 (free cone) so the modifiers do
; nothing at all rather than half-work.
;
; It also made the HAND diverge from the cloth: the physics zeroed one axis
; component while the Present/hand pass did not, so a modifier-held drag rotated
; the two about different axes -- the hand shooting off in its own direction
; while the skirt followed the cursor. The hand pass now mirrors the same
; zeroing (SwingGrabDisplacement in rzm_jiggle_cursor_preview.hlsl), so turning
; this back on cannot bring that divergence back.
;
; TO RESTORE: uncomment the block below. The $ll_jiggle_axis1_down /
; axis2_down key bindings are still maintained, so nothing else needs changing.
$ll_jiggle_axis_select_remielleblacklegsnback = 0
;if $ll_jiggle_axis1_down_remielleblacklegsnback == 1
;	$ll_jiggle_axis_select_remielleblacklegsnback = 1
;endif
;if $ll_jiggle_axis2_down_remielleblacklegsnback == 1
;	if $ll_jiggle_axis_select_remielleblacklegsnback == 1
;		$ll_jiggle_axis_select_remielleblacklegsnback = 0
;	else
;		$ll_jiggle_axis_select_remielleblacklegsnback = 2
;	endif
;endif
; A release only pokes when this gesture never became a grab combo. Hold
; seconds IS the strength fraction (clamped to [poke_min_strength, 1.0]):
; a near-instant tap floors there, a ~1s+ hold caps at full strength.
if $ll_jiggle_modifier_ok_remielleblacklegsnback == 1 && $ll_jiggle_combo_active_remielleblacklegsnback == 0
	if $ll_jiggle_lmb_prev_remielleblacklegsnback == 1 && $ll_jiggle_lmb_down_remielleblacklegsnback == 0
		$ll_jiggle_poke_sign_remielleblacklegsnback = -1
		$ll_jiggle_poke_hold_mult_remielleblacklegsnback = time - $ll_jiggle_lmb_press_time_remielleblacklegsnback
	elif $ll_jiggle_rmb_prev_remielleblacklegsnback == 1 && $ll_jiggle_rmb_down_remielleblacklegsnback == 0
		$ll_jiggle_poke_sign_remielleblacklegsnback = 1
		$ll_jiggle_poke_hold_mult_remielleblacklegsnback = time - $ll_jiggle_rmb_press_time_remielleblacklegsnback
	endif
endif
if $ll_jiggle_poke_sign_remielleblacklegsnback != 0
	if $ll_jiggle_poke_hold_mult_remielleblacklegsnback < $ll_jiggle_poke_min_strength_remielleblacklegsnback
		$ll_jiggle_poke_hold_mult_remielleblacklegsnback = $ll_jiggle_poke_min_strength_remielleblacklegsnback
	elif $ll_jiggle_poke_hold_mult_remielleblacklegsnback > 1.00
		$ll_jiggle_poke_hold_mult_remielleblacklegsnback = 1.00
	endif
	$ll_jiggle_poke_hold_mult_remielleblacklegsnback = $ll_jiggle_poke_hold_mult_remielleblacklegsnback * $ll_jiggle_poke_strength_remielleblacklegsnback
else
	$ll_jiggle_poke_hold_mult_remielleblacklegsnback = $ll_jiggle_poke_strength_remielleblacklegsnback
endif
; Charging: continuous (unlike poke_sign's one-frame pulse) -- true for the
; whole duration a lone LMB/RMB is held, so the physics shader can freeze
; the hovered normal/basis at the moment the hold STARTS (see
; rzm_jiggle_screen_state.hlsl's isCharging) instead of only sampling fresh
; at release. Never set while a combo is/was active.
$ll_jiggle_charge_sign_remielleblacklegsnback = 0
if $ll_jiggle_modifier_ok_remielleblacklegsnback == 1 && $ll_jiggle_combo_active_remielleblacklegsnback == 0
	if $ll_jiggle_lmb_down_remielleblacklegsnback == 1 && $ll_jiggle_rmb_down_remielleblacklegsnback == 0
		$ll_jiggle_charge_sign_remielleblacklegsnback = -1
	elif $ll_jiggle_rmb_down_remielleblacklegsnback == 1 && $ll_jiggle_lmb_down_remielleblacklegsnback == 0
		$ll_jiggle_charge_sign_remielleblacklegsnback = 1
	endif
endif
; Live (per-frame, not just at release) hand-cursor windup/preview state.
if $ll_jiggle_lmb_down_remielleblacklegsnback == 1
	if $ll_jiggle_lmb_prev_remielleblacklegsnback == 0
		$ll_jiggle_lmb_press_time_remielleblacklegsnback = time
	endif
	if $ll_jiggle_rmb_down_remielleblacklegsnback == 0
		$ll_jiggle_lmb_hold_fraction_remielleblacklegsnback = time - $ll_jiggle_lmb_press_time_remielleblacklegsnback
		if $ll_jiggle_lmb_hold_fraction_remielleblacklegsnback > $ll_jiggle_hand_windup_time_remielleblacklegsnback
			$ll_jiggle_lmb_hold_fraction_remielleblacklegsnback = $ll_jiggle_hand_windup_time_remielleblacklegsnback
		endif
	else
		$ll_jiggle_lmb_hold_fraction_remielleblacklegsnback = 0
	endif
else
	$ll_jiggle_lmb_hold_fraction_remielleblacklegsnback = 0
endif
$ll_jiggle_rmb_lone_hold_remielleblacklegsnback = 0
if $ll_jiggle_rmb_down_remielleblacklegsnback == 1
	if $ll_jiggle_rmb_prev_remielleblacklegsnback == 0
		$ll_jiggle_rmb_press_time_remielleblacklegsnback = time
	endif
	if $ll_jiggle_lmb_down_remielleblacklegsnback == 0
		$ll_jiggle_rmb_lone_hold_remielleblacklegsnback = 1
		$ll_jiggle_rmb_hold_fraction_remielleblacklegsnback = time - $ll_jiggle_rmb_press_time_remielleblacklegsnback
		if $ll_jiggle_rmb_hold_fraction_remielleblacklegsnback > $ll_jiggle_hand_rmb_windup_time_remielleblacklegsnback
			$ll_jiggle_rmb_hold_fraction_remielleblacklegsnback = $ll_jiggle_hand_rmb_windup_time_remielleblacklegsnback
		endif
	else
		$ll_jiggle_rmb_hold_fraction_remielleblacklegsnback = 0
	endif
else
	$ll_jiggle_rmb_hold_fraction_remielleblacklegsnback = 0
endif
$ll_jiggle_lmb_prev_remielleblacklegsnback = $ll_jiggle_lmb_down_remielleblacklegsnback
$ll_jiggle_rmb_prev_remielleblacklegsnback = $ll_jiggle_rmb_down_remielleblacklegsnback
if $ll_jiggle_lmb_down_remielleblacklegsnback == 0 && $ll_jiggle_rmb_down_remielleblacklegsnback == 0
	$ll_jiggle_combo_active_remielleblacklegsnback = 0
endif
; A probe armed by the previous Present has just had one whole frame to see
; the UI draw. Decode it once now; do not write viewport state every frame.
if $ll_viewport_probe_armed_remielleblacklegsnback == 1 && ResourceLLViewportSource !== null
	run = CustomShaderLLViewportLayoutDecode
endif
; Dumps are intentionally outside the armed window: F8 can inspect the most
; recent completed probe instead of needing to land on its 0.5-second tick.
; Hunting-mode dumps do not execute in normal runtime.
if $ll_jiggle_debug_dump == 1
	dump = ResourceLLViewportSource
	dump = ResourceLLViewportLayoutData
	dump = ResourceLLViewportFrameAPI
	; One F8 capture now contains source RT, UI placement record, public API,
	; calibration, detect, pin, jiggle and cursor-preview outputs.
	dump = ResourceLLBakeRT
	dump = ResourceLLDetectID
	dump = ResourceLLPinnedDetectID
	dump = ResourceLLPinnedDetectInfo
	dump = ResourceLLJiggleScreenState
	dump = ResourceLLJiggleCursorPreview
endif
if $ll_viewport_probe_enabled == 1 && time >= $ll_viewport_probe_next_time_remielleblacklegsnback
	; Arm the following frame only; no per-frame copy/clear of game resources.
	; Discard the previous snapshot only when a new local generation begins.
	ResourceLLViewportSource = null
	; A layout rect belongs to exactly one generation.  Clear this tiny
	; 16-float logical state before asking the next UI frame, so a missing
	; source/match after alt-tab or a UI transition cannot retain an old
	; offset.  This is not a texture copy and runs at the probe cadence only.
	clear = ResourceLLViewportFrameAPI 0.0
	$ll_viewport_probe_armed_remielleblacklegsnback = 1
	$ll_viewport_probe_generation_remielleblacklegsnback = $ll_viewport_probe_generation_remielleblacklegsnback + 1
	$ll_viewport_probe_next_time_remielleblacklegsnback = time + $ll_viewport_probe_interval_remielleblacklegsnback
else
	$ll_viewport_probe_armed_remielleblacklegsnback = 0
endif
if $ll_interaction_active_remielleblacklegsnback == 1
	pre run = CommandListLLPinDetected
endif
run = CommandListLLCursorUpdate
; Arm-edge reset for the hand's hover hysteresis (HAND_HOLD_FRAMES in
; rzm_jiggle_cursor_preview.hlsl). The hold budget is spent one frame per
; dispatch, but the dispatch only runs while armed -- so without this, letting
; the modifier go while hovering the body, moving the cursor to empty sky and
; re-arming would resume with a full budget and paint the OLD basis at the new
; cursor for a few frames before giving up. Clearing the whole preview buffer
; on the 0 -> 1 edge drops the stale basis along with the budget, so a re-arm
; always starts from an honest miss. Cheap: 5 float4s, once per Alt press.
if $ll_jiggle_mode_remielleblacklegsnback == 1 && $ll_jiggle_mode_prev_remielleblacklegsnback == 0
	clear = ResourceLLJiggleCursorPreview 0.0
endif
$ll_jiggle_mode_prev_remielleblacklegsnback = $ll_jiggle_mode_remielleblacklegsnback
if $ll_interaction_active_remielleblacklegsnback == 1 && $ll_jiggle_mode_remielleblacklegsnback == 1
	run = CustomShaderLLUpdateJiggleCursorPreview
	if $ll_jiggle_hand_debug_remielleblacklegsnback == 2
		run = CustomShaderLLJiggleCursor
	endif
	if $ll_jiggle_hand_debug_remielleblacklegsnback >= 1
		; Grab hand also previews during a lone RMB hold (charging a push
		; poke) -- not an actual grab, so vibration stays off (that's gated
		; separately on the real capture state inside the shader).
		if $isMouseButtonDown == 1 || $ll_jiggle_rmb_lone_hold_remielleblacklegsnback == 1
			; Outline drawn first so it lands behind the real hand -- only
			; its enlarged silhouette's rim stays visible past the real
			; hand's edges.
			run = CustomShaderLLPresentHandActionOutline
			run = CustomShaderLLPresentHandAction
		else
			run = CustomShaderLLPresentHandOutline
			run = CustomShaderLLPresentHand
		endif
	endif
endif
; This is deliberately post-Present: a flag is true for the complete frame in
; which this character drew, then cannot leak into another character/mod.
post $ll_interaction_active_remielleblacklegsnback = 0



; .ini generated by XXMI (XX-Model-Importer) v1.8.1
; If you have any issues or find any bugs, please open a ticket at https://github.com/leotorrez/XXMI-Tools/issues
