namespace = TexFx

; Variables & Resources ------------------------------
[Constants]
global $version = 1.045
global persist $uncensor = 1
global $hull_hack
global $texfx_on = 1
global $hull_hack_key = 1
global $use_default_shader
global $glow_intensity = 1
global $bloom_intensity = 1

;Render Target Copies for Blending
[ResourceRefo1]
max_copies_per_frame = 1
[ResourceRefo2]
max_copies_per_frame = 1
; [ResourceRefo3]
; max_copies_per_frame = 1
; [ResourceRefo4]
; max_copies_per_frame = 1

;Incase we can solve the CB ref issues
; [ResourceRefCB0]
; [ResourceRefCB1]
; [ResourceRefCB2]

; Present --------------------------------------------
[Present]
$use_default_shader = -1
run = CommandListResetResources


[ClearRenderTargetView]
y69 = 0
if $texfx_on == 0
    y69 = -1
endif
z69 = $uncensor
w69 = 0

; Commandlists ---------------------------------------
[CommandListT]
$use_default_shader = 0
[CommandListT.0]
$use_default_shader = 0
[CommandListTransparency]
$use_default_shader = 0
[CommandListTransparency.0]
$use_default_shader = 0

[CommandListT.1]
$use_default_shader = 1
[CommandListTransparency.1]
$use_default_shader = 1

[CommandListShh]
$hull_hack = 0
[CommandListSupHH]
$hull_hack = 0
[CommandListSupressHullHack]
$hull_hack = 0

[CommandListHullHack]
if !$hull_hack_key
    w69 = -1
endif
if !$hull_hack
    $hull_hack = 1
    w69 = -1
endif

[CommandListSetResourceReferences]
ps-t71 = ResourceRefo1
ps-t72 = ResourceRefo2
; ps-t73 = ResourceRefo3
; ps-t74 = ResourceRefo4
run = CommandListSetResources


[CommandListSetResources]
ResourceRefo1 = o1 unless_null
ResourceRefo2 = o2 unless_null
; ResourceRefo3 = o3 unless_null
; ResourceRefo4 = o4 unless_null

[CommandListSetIntensity]
y70 = $glow_intensity
z70 = $bloom_intensity

[CommandListClearIntensity]
$bloom_intensity = 1
$glow_intensity = 1
$_1 = 0
$_2 = 0

[CommandListRR]
run = CommandListResetResources
[CommandListResetResources]
ps-t69 = null
ps-t70 = null
ps-t71 = null
ps-t72 = null
; ps-t73 = null
; ps-t74 = null