; Merged Mod: .\maodianMod\maodian.ini

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

[Constants]
global persist $swapvar = 0
global $active
global $creditinfo = 0
global persist $frame = 0
global persist $vg_count = 329
global persist $start_frame = 0
global persist $end_frame = 6543
global persist $speed = 0.5

[KeySwap]
condition = $active == 1
key = n
type = cycle
$swapvar = 1,0
$creditinfo = 0

[Present]
post $active = 0
if $frame > $end_frame
	$frame = $start_frame
endif
$frame = $frame + $speed
if $swapvar == 1
	$frame = $start_frame
endif

; Shader ------------------------------

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

[TextureOverridemaodianPosition]
hash = c824f110
run = CommandListmaodianPosition
$active = 1

[TextureOverridemaodianBlend]
hash = 9e8e1a9f
run = CommandListmaodianBlend

[TextureOverridemaodianTexcoord]
hash = bc444011
run = CommandListmaodianTexcoord

[TextureOverridemaodianVertexLimitRaise]
hash = 4fe093f3

[TextureOverridemaodianIB]
hash = 61c2f10d
run = CommandListmaodianIB

[TextureOverridemaodianHead]
hash = 61c2f10d
match_first_index = 0
run = CommandListmaodianHead

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

[CommandListmaodianPosition]
if $swapvar == 0
	vb0 = ResourcemaodianPosition.0
endif

[CommandListmaodianBlend]
if $swapvar == 0
	vb1 = ResourcemaodianBlend.0
	vs-t10 = ResourcePose
	x140 = $vg_count
	x141 = $frame
	handling = skip
	draw = 26572,0
endif

[CommandListmaodianTexcoord]
if $swapvar == 0
	vb1 = ResourcemaodianTexcoord.0
endif

[CommandListmaodianIB]
if $swapvar == 0
	handling = skip
	drawindexed = auto
endif

[CommandListmaodianHead]
if $swapvar == 0
	ib = ResourcemaodianHeadIB.0
	ps-t0 = ResourcemaodianHeadDiffuse.0
	ps-t1 = ResourcemaodianHeadLightMap.0
	ps-t2 = ResourcemaodianHeadShadow.0
endif

; Resources ---------------------------

[ResourcePose]
type = buffer
format = DXGI_FORMAT_R32G32B32A32_FLOAT
filename = .\yui.buf

[ResourcemaodianPosition.0]
type = Buffer
stride = 40
filename = .\maodianMod\maodianPosition.buf

[ResourcemaodianBlend.0]
type = Buffer
stride = 32
filename = .\maodianMod\maodianBlend.buf

[ResourcemaodianTexcoord.0]
type = Buffer
stride = 8
filename = .\maodianMod\maodianTexcoord.buf

[ResourcemaodianHeadIB.0]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\maodianMod\maodianHead.ib

[ResourcemaodianHeadDiffuse.0]
filename = .\maodianMod\maodianHeadDiffuse.dds

[ResourcemaodianHeadLightMap.0]
filename = .\maodianMod\maodianHeadLightMap.dds

[ResourcemaodianHeadShadow.0]
filename = .\maodianMod\maodianHeadShadow.dds



; .ini generated by GIMI (Genshin-Impact-Model-Importer) mod merger script
; If you have any issues or find any bugs, please open a ticket at https://github.com/SilentNightSound/GI-Model-Importer/issues or contact SilentNightSound#7430 on discord