namespace = TexFx

; ; Use Example
; [CommandList Draw Transparent Emissive Component]
; ps-t0 = ResourceDiffuse
; ps-t1 = ResoourceLightmap
; ps-t69 = ResourceTexFxMask
; if ps == 037730.0 && $\texfx\texfx_on
;     $\TexFx\_1 = 440
;     $\TexFx\_2 = 3
;     run = CommandList\TexFx\SetResourceReferences
;     run = CustomShader\TexFx\Component.0
; endif
; drawindexed = 440, 3, 0
; run = CommandList\TexFx\ResetResources

[Constants]
;DrawIndexed Params
global $_1 = 0
global $_2 = 0

; Default Component Shaders
[CustomShaderComponent.0]
handling = skip
cull = none
run = CommandList\TexFx\HullHack
vs = OutlineHull.hlsl
ps = OutlineWithDiffuseColor0.hlsl
drawindexed = $_1, $_2, 0

[CustomShaderComponentSupressHH.0]
handling = skip
cull = none
run = CommandList\TexFx\HullHack
ps = OutlineWithDiffuseColor0.hlsl
drawindexed = $_1, $_2, 0

[CustomShaderComponent.1]
handling = skip
cull = none
run = CommandList\TexFx\HullHack
vs = OutlineHull.hlsl
ps = OutlineWithDiffuseColor1.hlsl
drawindexed = $_1, $_2, 0

[CustomShaderComponentSupressHH.1]
handling = skip
cull = none
run = CommandList\TexFx\HullHack
ps = OutlineWithDiffuseColor1.hlsl
drawindexed = $_1, $_2, 0

[CommandListC]
run = CommandListComponent.0
[CommandListC.0]
run = CommandListComponent.0
[CommandListComponent]
run = CommandListComponent.0
[CommandListComponent.0]
run = CommandListSetIntensity
if ps == 037730.0 && $texfx_on
    run = CommandListHullHack
    run = CommandListSetResourceReferences
    if !w69
        run = CustomShaderComponent.0
    else
        run = CustomShaderComponentSupressHH.0
    endif
else
    drawindexed = $_1, $_2, 0
endif
run = CommandListResetResources
run = CommandListClearIntensity

[CommandListC.1]
run = CommandListComponent.1
[CommandListComponent.1]
run = CommandListSetIntensity
if ps == 037730.0 && $texfx_on
    run = CommandListHullHack
    run = CommandListSetResourceReferences
    if !w69
        run = CustomShaderComponent.1
    else
        run = CustomShaderComponentSupressHH.1
    endif
else
    drawindexed = $_1, $_2, 0
endif
run = CommandListResetResources
run = CommandListClearIntensity
