; WeifeiStreetlight

; Constants -------------------------
[Constants]
global $active
global $pause = 0
global $TargetSpeed
global $Freq = 0
global $VG_count = 303
global $strat_frame = 6
global $end_frame = 3708
;global $strat_frame = 3350
;global $end_frame = 3527
global $dt
global $ts
global $anime_state = 0
post ResourceWeifeiStreetlightPosition = copy_desc ResourceWeifeiStreetlightPosition.1
post run = CustomShaderComputeAnim

[KeyPause]
key = no_ctrl no_shift alt p
type = cycle
$pause = 0,1

[KeyAnime]
key = ]
type = cycle
$anime_state = 0,1

[Present]
if $active
    run = CustomShaderComputeAnim
endif
post $active = 0

[CustomShaderComputeAnim]
$dt = time - $ts
$ts = time
    if $pause == 0
        $Freq = $Freq + 24 * $dt
    endif
    if $anime_state == 1
        $Freq = 3350
        $anime_state = 0
    endif
    if $Freq > $end_frame-2
        $Freq = $strat_frame
    endif
    x88 = $Freq
    x89 = $VG_count
    cs-t50 = copy ResourceWeifeiStreetlightPosition.1
    cs-t51 = copy ResourceWeifeiStreetlightBlend
    cs-t52 = copy ResourceWeifeiStreetlightPose
    cs = ./res/anim.hlsl
    cs-u5 = copy ResourceWeifeiStreetlightPosition.1
    ResourceWeifeiStreetlightPosition = ref cs-u5
    Dispatch = 26549, 1, 1
    cs-u5 = null
    cs-t50 = null
    cs-t51 = null

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

[TextureOverrideWeifeiStreetlightBlend]
hash = 5c15b620
vb0 = ResourceWeifeiStreetlightPosition
$active=1

[TextureOverrideWeifeiStreetlightBlendMid]
hash = ba5fecd4
vb0 = ResourceWeifeiStreetlightPosition
$active=1

[TextureOverrideWeifeiStreetlight2Blend]
hash = f802c390
vb0 = ResourceWeifeiStreetlightPosition
$active=1

[TextureOverrideWeifeiStreetlight2BlendMid]
hash = 5cd27307
vb0 = ResourceWeifeiStreetlightPosition
$active=1
;26549

[TextureOverrideWeifeiStreetlightIB]
hash = 528abe27
handling = skip
drawindexed = auto

[TextureOverrideWeifeiStreetlightIBMid]
hash = 7624b27b
handling = skip
drawindexed = auto

[TextureOverrideWeifeiStreetlight2IB]
hash = 80a8f690
handling = skip
drawindexed = auto

[TextureOverrideWeifeiStreetlight2IBMid]
hash = 2883411a
handling = skip
drawindexed = auto

[TextureOverrideWeifeiStreetlightA]
hash = 528abe27
match_first_index = 0
run = CommandListSkinTexture
ib = ResourceWeifeiStreetlightAIB

[TextureOverrideWeifeiStreetlightAMid]
hash = 7624b27b
match_first_index = 0
run = CommandListSkinTexture
ib = ResourceWeifeiStreetlightAIB

[TextureOverrideWeifeiStreetlight2A]
hash = 80a8f690
match_first_index = 0
run = CommandListSkinTexture
ib = ResourceWeifeiStreetlightAIB

[TextureOverrideWeifeiStreetlight2AMid]
hash = 2883411a
match_first_index = 0
run = CommandListSkinTexture
ib = ResourceWeifeiStreetlightAIB

[TextureOverrideWeifeiStreetlightADiffuse]
hash = 28563294
this = ResourceWeifeiStreetlightADiffuse

[TextureOverrideWeifeiStreetlightANormalMap]
hash = 43fdde2b
this = ResourceWeifeiStreetlightANormalMap

[TextureOverrideWeifeiStreetlightALightMap]
hash = b1e2d2bd
this = ResourceWeifeiStreetlightALightMap

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

; Resources -------------------------
[ResourceWeifeiStreetlightPosition]
[ResourceWeifeiStreetlightPosition.1]
type = Buffer
stride = 24
filename = WeifeiStreetlight.buf

[ResourceWeifeiStreetlightBlend]
type = Buffer
stride = 32
filename = WeifeiStreetlightBlend.buf

[ResourceWeifeiStreetlightPose]
type = Buffer
stride = 48
filename = pose.buf

[ResourceWeifeiStreetlightAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = WeifeiStreetlightA.ib

[ResourceWeifeiStreetlightADiffuse]
filename = WeifeiStreetlightADiffuse.dds

[ResourceWeifeiStreetlightANormalMap]
filename = WeifeiStreetlightANormalMap.dds

[ResourceWeifeiStreetlightALightMap]
filename = WeifeiStreetlightALightMap.dds



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