[Present]
post $body_type = 0
post $active = 0

[Constants]
global persist $body_type = 0
global persist $top = 0
global persist $top2 = 0
global persist $panty = 0
global persist $tr1 = 0
global $active = 0

[Key X1]
condition = $active
Key = X 1
type = cycle
$top = 0,1,2

[Key X2]
condition = $active
Key = X 2
type = cycle
$top2 = 0,1

[Key Z1]
condition = $active
Key = Z 1
type = cycle
$panty = 0,1

[Key C1]
condition = $active
Key = C 1
type = cycle
$tr1 = 0,1,2,3

;--------------------------------------transparency
[CustomShaderTransparency1]
blend[0] = ADD BLEND_FACTOR INV_BLEND_FACTOR
blend_factor[0] = 0.85
blend_factor[1] = 0.85
blend_factor[2] = 0.85
blend_factor[3] = 1
if $shader_type != 5
	drawindexed = auto
endif

[CustomShaderTransparency2]
blend[0] = ADD BLEND_FACTOR INV_BLEND_FACTOR
blend_factor[0] = 0.75
blend_factor[1] = 0.75
blend_factor[2] = 0.75
blend_factor[3] = 1
if $shader_type != 5
	drawindexed = auto
endif

[CustomShaderTransparency3]
blend[0] = ADD BLEND_FACTOR INV_BLEND_FACTOR
blend_factor[0] = 0.65
blend_factor[1] = 0.65
blend_factor[2] = 0.65
blend_factor[3] = 1
if $shader_type != 5
	drawindexed = auto
endif

[CustomShaderTransparency4]
blend[0] = ADD BLEND_FACTOR INV_BLEND_FACTOR
blend_factor[0] = 0.55
blend_factor[1] = 0.55
blend_factor[2] = 0.55
blend_factor[3] = 1
if $shader_type != 5
	drawindexed = auto
endif

[CustomShaderTransparency5]
blend[0] = ADD BLEND_FACTOR INV_BLEND_FACTOR
blend_factor[0] = 0.45
blend_factor[1] = 0.45
blend_factor[2] = 0.45
blend_factor[3] = 1
if $shader_type != 5
	drawindexed = auto
endif

[CustomShaderTransparency6]
blend[0] = ADD BLEND_FACTOR INV_BLEND_FACTOR
blend_factor[0] = 0.35
blend_factor[1] = 0.35
blend_factor[2] = 0.35
blend_factor[3] = 1
if $shader_type != 5
	drawindexed = auto
endif

[CustomShaderTransparency7]
blend[0] = ADD BLEND_FACTOR INV_BLEND_FACTOR
blend_factor[0] = 0.25
blend_factor[1] = 0.25
blend_factor[2] = 0.25
blend_factor[3] = 1
if $shader_type != 5
	drawindexed = auto
endif

[CustomShaderTransparency8]
blend[0] = ADD BLEND_FACTOR INV_BLEND_FACTOR
blend_factor[0] = 0.05
blend_factor[1] = 0.05
blend_factor[2] = 0.05
blend_factor[3] = 1
if $shader_type != 5
	drawindexed = auto
endif

[CommandListTranspaency1]
if $tr1 == 0 && $shader_type != 5
	drawindexed = auto
elif $tr1 == 1
	run = CustomShaderTransparency1
elif $tr1 == 2
	run = CustomShaderTransparency2
elif $tr1 == 3
	run = CustomShaderTransparency3
endif

;--------------------------------------top
[TextureOverrideTop1]
hash = 8a9577c3
match_first_index = 4542
	handling = skip
if $top < 2
	vb0 = Resource_Top_SVB
	ib  = Resource_Top_SIB
	drawindexed = auto
	if $top == 0
		vb0 = Resource_Top_1VB
		ib  = Resource_Top_1IB
		run = CommandListTranspaency1
	elif $top == 1
		vb0 = Resource_Top_2VB
		ib  = Resource_Top_2IB
		run = CommandListTranspaency1
	endif
endif

[TextureOverrideTop2]
hash = 8a9577c3
match_first_index = 12342
if $top == 2
	handling = skip
endif

[TextureOverrideTop3]
hash = 8a9577c3
match_first_index = 14610
if $top == 2
	handling = skip
endif

[TextureOverrideTop4]
hash = 8a9577c3
match_first_index = 10878
if $top == 2
	handling = skip
endif

[TextureOverrideTop5]
hash = 8a9577c3
match_first_index = 15840
if $top == 2 || $top2 == 1
	handling = skip
endif

[TextureOverrideTop6]
hash = 8a9577c3
match_first_index = 0
if $top == 2 || $top2 == 1
	handling = skip
endif

[TextureOverrideTop7]
hash = 8a9577c3
match_first_index = 1854
if $top == 2 || $top2 == 1
	handling = skip
endif

;--------------------------------------panty
[TextureOverridePanty1]
hash = 11fc8814
match_first_index = 0
	handling = skip
if $panty == 0
	vb0 = Resource_Panty_SVB
	ib  = Resource_Panty_SIB
	drawindexed = auto

	vb0 = Resource_PantyVB
	ib  = Resource_PantyIB
	run = CommandListTranspaency1
endif

[TextureOverridePanty2]
hash = 11fc8814
match_first_index = 8772
if $panty == 1
	handling = skip
endif

[TextureOverridePanty3]
hash = 11fc8814
match_first_index = 12720
if $panty == 1
	handling = skip
endif

[TextureOverridePanty4]
hash = 11fc8814
match_first_index = 10176
if $panty == 1
	handling = skip
endif


;--------------------------------------body
[TextureOverrideBody]
hash = 3e919253
match_first_index = 0
$active = 1
	handling = skip
if $top == 0
	vb0 = Resource_Body_top1VB
	ib  = Resource_Body_top1IB
elif $top == 1
	vb0 = Resource_Body_top2VB
	ib  = Resource_Body_top2IB
else
	vb0 = Resource_Body_top3VB
	ib  = Resource_Body_top3IB
endif
	drawindexed = auto

if $body_type == 0
	if $panty == 0
		vb0 = Resource_Body_bot1_PVB
		ib  = Resource_Body_bot1_PIB
	elif $panty == 1
		vb0 = Resource_Body_bot2_PVB
		ib  = Resource_Body_bot2_PIB
	endif
elif $body_type == 1
	if $panty == 0
		vb0 = Resource_Body_bot1_UVB
		ib  = Resource_Body_bot1_UIB
	elif $panty == 1
		vb0 = Resource_Body_bot2_UVB
		ib  = Resource_Body_bot2_UIB
	endif
endif
	drawindexed = auto


[Resource_Top_SVB]
type = Buffer
stride = 76
filename = resources\top_S.vb
[Resource_Top_SIB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = resources\top_S.ib

[Resource_Top_1VB]
type = Buffer
stride = 76
filename = resources\top_1.vb
[Resource_Top_1IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = resources\top_1.ib

[Resource_Top_2VB]
type = Buffer
stride = 76
filename = resources\top_2.vb
[Resource_Top_2IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = resources\top_2.ib

[Resource_Panty_SVB]
type = Buffer
stride = 76
filename = resources\panty_S.vb
[Resource_Panty_SIB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = resources\panty_S.ib

[Resource_PantyVB]
type = Buffer
stride = 76
filename = resources\panty.vb
[Resource_PantyIB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = resources\panty.ib

[Resource_Body_top1VB]
type = Buffer
stride = 80
filename = resources\body_top1.vb
[Resource_Body_top1IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = resources\body_top1.ib

[Resource_Body_top2VB]
type = Buffer
stride = 80
filename = resources\body_top2.vb
[Resource_Body_top2IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = resources\body_top2.ib

[Resource_Body_top3VB]
type = Buffer
stride = 80
filename = resources\body_top3.vb
[Resource_Body_top3IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = resources\body_top3.ib

[Resource_Body_bot1_PVB]
type = Buffer
stride = 80
filename = resources\body_bot1_P.vb
[Resource_Body_bot1_PIB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = resources\body_bot1_P.ib

[Resource_Body_bot2_PVB]
type = Buffer
stride = 80
filename = resources\body_bot2_P.vb
[Resource_Body_bot2_PIB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = resources\body_bot2_P.ib

[Resource_Body_bot1_UVB]
type = Buffer
stride = 80
filename = resources\body_bot1_U.vb
[Resource_Body_bot1_UIB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = resources\body_bot1_U.ib

[Resource_Body_bot2_UVB]
type = Buffer
stride = 80
filename = resources\body_bot2_U.vb
[Resource_Body_bot2_UIB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = resources\body_bot2_U.ib


