; Yae

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

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

[Present]
post $active = 0
run = CommandListCreditInfo

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

[TextureOverrideYaePosition]
hash = 3a7f71f5
vb0 = ResourceYaePosition
$active = 1

[TextureOverrideYaeBlend]
hash = d9ee433a
vb1 = ResourceYaeBlend
handling = skip
draw = 98053, 0 

[TextureOverrideYaeTexcoord]
hash = 4aebeee0
vb1 = ResourceYaeTexcoord

[TextureOverrideYaeVertexLimitRaise]
hash = f7574bda

[TextureOverrideYaeIB]
hash = 5d09aa00
handling = skip


[TextureOverrideYaeHead]
hash = 5d09aa00
match_first_index = 0
ib = ResourceYaeHeadIB
ps-t0 = ResourceYaeHeadDiffuse
ps-t1 = ResourceYaeHeadLightMap
if $variable0 == 0 && $variable4 == 0
  drawindexed = 33546, 0, 0
else if $variable0 == 1 && $variable4 == 0
  drawindexed = 33546, 33546, 0
endif
if ($variable2 == 0 || $variable2 == 1) && $variable4 == 0
  drawindexed = 0, 67092, 0
endif
if $variable2 == 0 && $variable4 == 0
  drawindexed = 0, 67092, 0
endif
if $variable4 == 1
  drawindexed = 31260, 67092, 0
endif


[TextureOverrideYaeBody]
hash = 5d09aa00
match_first_index = 19968
ib = ResourceYaeBodyIB
ps-t0 = ResourceYaeBodyDiffuse
ps-t1 = ResourceYaeBodyLightMap
ps-t69 = ResourceYaeBodyAlpha
if $variable0 == 0 && $variable4 == 0
  drawindexed = 101364, 0, 0
  ps-t69 = ResourceYaeBodyAlpha
  $\TexFx\_1 = 101364
  $\TexFx\_2 = 0
  run = CommandList\TexFx\Component.0
else if $variable0 == 1 && $variable4 == 0
  drawindexed = 103572, 101364, 0
  ps-t69 = ResourceYaeBodyAlpha
  $\TexFx\_1 = 103572
  $\TexFx\_2 = 101364
  run = CommandList\TexFx\Component.0
endif
if ($variable2 == 0 || $variable2 == 1) && $variable4 == 0
  drawindexed = 7242, 204936, 0
endif
if $variable2 == 0 && $variable4 == 0
  drawindexed = 0, 212178, 0
endif
if $variable4 == 1
  drawindexed = 84114, 212178, 0
endif


[TextureOverrideYaeDress]
hash = 5d09aa00
match_first_index = 62868
ib = ResourceYaeDressIB
ps-t0 = ResourceYaeDressDiffuse
ps-t1 = ResourceYaeDressLightMap
ps-t69 = ResourceYaeDressAlpha
if $variable0 == 0 && $variable4 == 0
  drawindexed = 612, 0, 0
  ps-t69 = ResourceYaeDressAlpha
  $\TexFx\_1 = 612
  $\TexFx\_2 = 0
  run = CommandList\TexFx\Component.0
else if $variable0 == 1 && $variable4 == 0
  drawindexed = 612, 612, 0
  ps-t69 = ResourceYaeDressAlpha
  $\TexFx\_1 = 612
  $\TexFx\_2 = 612
  run = CommandList\TexFx\Component.0
endif
if ($variable2 == 0 || $variable2 == 1) && $variable4 == 0
  drawindexed = 4608, 1224, 0
endif
if $variable2 == 0 && $variable4 == 0
  drawindexed = 1734, 5832, 0
endif
if $variable4 == 1
  handling = skip
endif


[TextureOverrideYaeFaceHeadDiffuse]
hash = 267091ab
ps-t0 = ResourceYaeFaceHeadDiffuse


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

[CommandListCreditInfo]
if $creditinfo == 0 && $active == 1
	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

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

[ResourceYaePosition]
type = Buffer
stride = 40
filename = YaePosition.buf

[ResourceYaeBlend]
type = Buffer
stride = 32
filename = YaeBlend.buf

[ResourceYaeTexcoord]
type = Buffer
stride = 20
filename = YaeTexcoord.buf

[ResourceYaeHeadIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = YaeHead.ib

[ResourceYaeBodyIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = YaeBody.ib

[ResourceYaeDressIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = YaeDress.ib

[ResourceYaeHeadDiffuse]
filename = YaeHeadDiffuse.dds

[ResourceYaeHeadLightMap]
filename = YaeHeadLightMap.dds

[ResourceYaeBodyDiffuse]
filename = YaeBodyDiffuse.dds

[ResourceYaeBodyLightMap]
filename = YaeBodyLightMap.dds

[ResourceYaeDressDiffuse]
filename = YaeDressDiffuse.dds

[ResourceYaeDressLightMap]
filename = YaeDressLightMap.dds

[ResourceYaeFaceHeadDiffuse]
filename = YaeFaceHeadDiffuse.dds

[ResourceYaeDressAlpha]
filename = YaeDressAlpha.dds

[ResourceYaeBodyAlpha]
filename = YaeBodyAlpha.dds

[ResourceCreditInfo]
type = Buffer
data = "Created by Exce"


; .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
[Constants]
global persist $variable0 = 0
global persist $variable1 = 0
global persist $variable2 = 0
global persist $variable3 = 0
global persist $variable4 = 0
[KeySwap0]
key = VK_DOWN
condition = $active == 1
type = cycle
$variable0 = 0,1

[KeySwap2]
key = VK_UP
condition = $active == 1
type = cycle
$variable2 = 0,1,2
[KeySwap4]
key = VK_RIGHT
condition = $active == 1
type = cycle
$variable4 = 0,1

