; Cocolia

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

[Constants]
global persist $swapvar = 0
global $ActiveCharacter = 0
[KeySwap]
condition = $ActiveCharacter == 1
key = h
type = cycle
$swapvar = 0,1

[Present]
post $ActiveCharacter = 0

; Custom Shaders ----------------------------

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

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

[TextureOverrideCocoliaBlend]
hash = 554e1ea6
handling = skip
vb2 = ResourceCocoliaBlend
if DRAW_TYPE == 1
	vb0 = ResourceCocoliaPosition
	draw = 21544,0
endif
if DRAW_TYPE == 8
    Resource\SRMI\PositionBuffer = ref ResourceCocoliaPositionCS
    Resource\SRMI\BlendBuffer = ref ResourceCocoliaBlendCS
    $\SRMI\vertex_count = 21544
endif


[TextureOverrideCocoliaTexcoord]
hash = c8f49a82
vb1 = ResourceCocoliaTexcoord

[TextureOverrideCocoliaVertexLimitDraw]
hash = 5c815e96
override_vertex_count = 21544
override_byte_stride = 40
uav_byte_stride = 4

[TextureOverrideCocoliaIB]
hash = b0bf78bf
handling = skip

[TextureOverrideCocoliaA]
hash = b0bf78bf
match_first_index = 25107
ib = ResourceCocoliaAIB
if ps-t0 == 4901341
	ps-t4 = Resourcewhite
endif
if ps-t6 == 39
	ps-t6 = ResourceCocoliaAStockingMap
endif
if ps-t8 == 39
	ps-t8 = ResourceCocoliaAStockingMap
endif
drawindexed = auto

[TextureOverrideCocoliaB]
hash = b0bf78bf
match_first_index = 54927
if ps-t0 == 4901341
	ps-t4 = Resourcewhite
endif
run = CommandListCocoliaB
$ActiveCharacter = 1
ib = ResourceCocoliaBIB

[TextureOverrideCocoliaC]
hash = b0bf78bf
match_first_index = 0
if ps-t0 == 4901341
	ps-t4 = Resourcewhite
endif
ib = null

[TextureOverrideCocoliaD]
hash = b0bf78bf
match_first_index = 8841
if ps-t0 == 4901341
	ps-t4 = Resourcewhite
endif
ib = null

[TextureOverrideCocoliaADiffuse]
hash = e2cdb79c
filter_index = 37
this = ResourceCocoliaADiffuse

[TextureOverrideCocoliaALightMap]
hash = 7362f07e
filter_index = 38
this = ResourceCocoliaALightMap

[TextureOverrideCocoliaAStockingMap]
hash = e1447a9a
filter_index = 39
this = ResourceCocoliaAStockingMap

[TextureOverrideCyreneUlt4]
hash = a24bba0e
filter_index = 4901341

[Resourcewhite]
filename = white.dds

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

[CommandListCocoliaB]
if $swapvar == 0
	ib = ResourceCocoliaBIB
else if $swapvar == 1
	ib = ResourceCocoliaBIB
	run = CustomShaderTransparency
endif

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

[ResourceCocoliaPosition]
type = Buffer
stride = 40
filename = CocoliaPosition.buf

[ResourceCocoliaBlend]
type = Buffer
stride = 32
filename = CocoliaBlend.buf

[ResourceCocoliaTexcoord]
type = Buffer
stride = 20
filename = CocoliaTexcoord.buf

[ResourceCocoliaAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = CocoliaA.ib

[ResourceCocoliaBIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = CocoliaB.ib

[ResourceCocoliaADiffuse]
filename = CocoliaADiffuse.dds

[ResourceCocoliaALightMap]
filename = CocoliaALightMap.dds

[ResourceCocoliaAStockingMap]
filename = CocoliaAStockingMap.dds

[ResourceCocoliaBDiffuse]
filename = CocoliaBDiffuse.dds

[ResourceCocoliaBLightMap]
filename = CocoliaBLightMap.dds


; .ini generated by GIMI (Genshin-Impact-Model-Importer)
; 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

; -------------------- Auto-generated CS resources --------------------
[ResourceCocoliaBodyDrawCS]
type = RWStructuredBuffer
array = 21544
data = R32_FLOAT 1 2 3 4 5 6 7 8 9 10

[ResourceCocoliaPositionCS]
type = StructuredBuffer
stride = 40
filename = CocoliaPosition.buf

[ResourceCocoliaBlendCS]
type = StructuredBuffer
stride = 32
filename = CocoliaBlend.buf
