; Merged Mod: .\1. Xingqiumain\Xingqiu.ini, .\2. Xingqiubody\Xingqiu.ini

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

[Constants]
global persist $swapvar = 0
global $active
global $creditinfo = 0

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

[Present]
post $active = 0

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

[CustomShaderTransparency]
blend = ADD BLEND_FACTOR INV_BLEND_FACTOR
blend_factor[0] = 0.87
blend_factor[1] = 0.87
blend_factor[2] = 0.87
blend_factor[3] = 1
handling = skip
drawindexed = auto

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

[TextureOverrideXingqiuPosition]
hash = 25aed172
run = CommandListXingqiuPosition
$active = 1

[TextureOverrideXingqiuBlend]
hash = 8f0e9948
run = CommandListXingqiuBlend

[TextureOverrideXingqiuTexcoord]
hash = 4c25bd5f
run = CommandListXingqiuTexcoord

[TextureOverrideXingqiuVertexLimitRaise]
hash = 702fc085

[TextureOverrideXingqiuIB]
hash = 82c97b1c
run = CommandListXingqiuIB

[TextureOverrideXingqiuHead]
hash = 82c97b1c
match_first_index = 6132
run = CommandListXingqiuHead

[TextureOverrideXingqiuFaceHeadDiffuse]
hash = e35f8bf8
run = CommandListXingqiuFaceHeadDiffuse

[TextureOverrideXingqiuBody]
hash = 82c97b1c
match_first_index = 6132
run = CommandListXingqiuBody

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

[CommandListXingqiuPosition]
if $swapvar == 0
	vb0 = ResourceXingqiuPosition.0
else if $swapvar == 1
	vb0 = ResourceXingqiuPosition.1
endif

[CommandListXingqiuBlend]
if $swapvar == 0
	vb1 = ResourceXingqiuBlend.0
	handling = skip
	draw = 56293,0
else if $swapvar == 1
	vb1 = ResourceXingqiuBlend.1
	handling = skip
	draw = 64168,0
endif

[CommandListXingqiuTexcoord]
if $swapvar == 0
	vb1 = ResourceXingqiuTexcoord.0
else if $swapvar == 1
	vb1 = ResourceXingqiuTexcoord.1
endif

[CommandListXingqiuIB]
if $swapvar == 0
	handling = skip
else if $swapvar == 1
	handling = skip
endif

[CommandListXingqiuHead]
if $swapvar == 0
	ib = ResourceXingqiuHeadIB.0
	ps-t0 = ResourceXingqiuHeadDiffuse.0
	ps-t1 = ResourceXingqiuHeadLightMap.0
	run = CustomShaderTransparency
else if $swapvar == 1
	ib = ResourceXingqiuHeadIB.1
	ps-t0 = ResourceXingqiuHeadDiffuse.1
	ps-t1 = ResourceXingqiuHeadLightMap.1
	drawindexed = auto
endif

[CommandListXingqiuFaceHeadDiffuse]
if $swapvar == 0
	ps-t0 = ResourceXingqiuFaceHeadDiffuse.0
else if $swapvar == 1
	ps-t0 = ResourceXingqiuFaceHeadDiffuse.1
endif

[CommandListXingqiuBody]
if $swapvar == 0
	ib = ResourceXingqiuBodyIB.0
	ps-t0 = ResourceXingqiuBodyDiffuse.0
	ps-t1 = ResourceXingqiuBodyLightMap.0
	drawindexed = auto
else if $swapvar == 1
	ib = ResourceXingqiuBodyIB.1
	ps-t0 = ResourceXingqiuBodyDiffuse.1
	ps-t1 = ResourceXingqiuBodyLightMap.1
	drawindexed = auto
endif

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

[ResourceXingqiuPosition.0]
type = Buffer
stride = 40
filename = .\1. Xingqiumain\XingqiuPosition.buf

[ResourceXingqiuBlend.0]
type = Buffer
stride = 32
filename = .\1. Xingqiumain\XingqiuBlend.buf

[ResourceXingqiuTexcoord.0]
type = Buffer
stride = 12
filename = .\1. Xingqiumain\XingqiuTexcoord.buf

[ResourceXingqiuHeadIB.0]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\1. Xingqiumain\XingqiuHead.ib

[ResourceXingqiuBodyIB.0]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\1. Xingqiumain\XingqiuBody.ib

[ResourceXingqiuHeadDiffuse.0]
filename = .\1. Xingqiumain\XingqiuHeadDiffuse.dds

[ResourceXingqiuHeadLightMap.0]
filename = .\1. Xingqiumain\XingqiuHeadLightMap.dds

[ResourceXingqiuBodyDiffuse.0]
filename = .\1. Xingqiumain\XingqiuBodyDiffuse.dds

[ResourceXingqiuBodyLightMap.0]
filename = .\1. Xingqiumain\XingqiuBodyLightMap.dds

[ResourceXingqiuFaceHeadDiffuse.0]
filename = .\1. Xingqiumain\XingqiuFaceHeadDiffuse.dds

[ResourceXingqiuPosition.1]
type = Buffer
stride = 40
filename = .\2. Xingqiubody\XingqiuPosition.buf

[ResourceXingqiuBlend.1]
type = Buffer
stride = 32
filename = .\2. Xingqiubody\XingqiuBlend.buf

[ResourceXingqiuTexcoord.1]
type = Buffer
stride = 12
filename = .\2. Xingqiubody\XingqiuTexcoord.buf

[ResourceXingqiuHeadIB.1]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\2. Xingqiubody\XingqiuHead.ib

[ResourceXingqiuBodyIB.1]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\2. Xingqiubody\XingqiuBody.ib

[ResourceXingqiuHeadDiffuse.1]
filename = .\2. Xingqiubody\XingqiuHeadDiffuse.dds

[ResourceXingqiuHeadLightMap.1]
filename = .\2. Xingqiubody\XingqiuHeadLightMap.dds

[ResourceXingqiuBodyDiffuse.1]
filename = .\2. Xingqiubody\XingqiuBodyDiffuse.dds

[ResourceXingqiuBodyLightMap.1]
filename = .\2. Xingqiubody\XingqiuBodyLightMap.dds

[ResourceXingqiuFaceHeadDiffuse.1]
filename = .\2. Xingqiubody\XingqiuFaceHeadDiffuse.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