Skip to content

Switching to keyboard for shader hunting

Bo3b Johnson edited this page May 17, 2014 · 3 revisions

######If you don't have XBox controllers, you will probably want to use the keyboard to find and mark shaders. There are default keys assigned below, but you can change them to anything you prefer, including volume buttons, macro keys and anything XInput supports. You want these keys to not conflict with anything the game itself uses. I've made this example Helix style, since a lot of us are familiar with that layout.


Go to the d3dx.ini file and find the section that starts with:

;------------------------------------------------------------------------------------------------------
; Shader isolation options. 

Change the whole section to the following code to disable XBox controller and enable Keyboard.

;------------------------------------------------------------------------------------------------------
; Shader isolation options. 

; XInputDevice activates a XBOX360 controller for input.
;XInputDevice=0

; Use a DirectX input device for input.
Input=Keyboard

; Highlight mode of currently selected shader / rendertarget.
; "skip" = skip shader. don't render anything using the currently selected shader.
; "original" = fall back to original shader if the currently selected shader was patched.
; "mono" = disable stereo for the selected shader / rendertarget.
; "zero" = shader output is all zero. NOTE: this has a big performance impact.
marking_mode=skip

; rotate through all VISIBLE pixel shaders at the current scene.
;next_pixelshader=RIGHT_SHOULDER
;previous_pixelshader=LEFT_SHOULDER
;mark_pixelshader=A

; rotate through all VISIBLE vertex shaders at the current scene.
;next_vertexshader=RightTrigger
;previous_vertexshader=LeftTrigger
;mark_vertexshader=B

; rotate through all USED index buffers at the current scene.
;next_indexbuffer=Y
;previous_indexbuffer=X
;mark_indexbuffer=START

; rotate through all USED render targets at the current scene.
;next_rendertarget=DPAD_UP
;previous_rendertarget=DPAD_DOWN
;mark_rendertarget=LEFT_THUMB

; additional screenshot button
;take_screenshot=BACK

; tunable parameter to use in modified shaders as variable (StereoParams.w)
; enabling tuning results in a small performance hit because the parameter texture
; has to be updated frequently. 
;tune_enable=0
;tune_up=DPAD_RIGHT
;tune_down=DPAD_LEFT

; tune values in stereo texture.
;tune2_up=DPAD_UP
;tune2_down=DPAD_DOWN
;tune3_up=X
;tune3_down=Y

; default parameter value is 1 and the value is incremented and decremented using
; the following step size.
;tune_step=0.05

;------------------------------------------------------------------------------------------------------
; Example keyboard shortcut configuration using keypad
next_pixelshader=Num 2
previous_pixelshader=Num 1
mark_pixelshader=Num 3
next_vertexshader=Num 5
previous_vertexshader=Num 4
mark_vertexshader=Num 6
;next_indexbuffer=Next Track
;previous_indexbuffer=Prev Track
;mark_indexbuffer=Media Stop
;next_rendertarget=Page Down
;previous_rendertarget=Page Up
;mark_rendertarget=Home
take_screenshot=Prnt Scrn
;tune_up=Insert
;tune_down=Delete

######If you are using a localized system, you will want to change the names in the text to match your language. In Spanish for example, you need ; Use a DirectX input device for input. Input=Teclado

; Example keyboard shortcut configuration using keypad
next_pixelshader=NUMERO 2
previous_pixelshader=NUMERO 1
mark_pixelshader=NUMERO 3
next_vertexshader=NUMERO 5
previous_vertexshader=NUMERO 4
mark_vertexshader=NUMERO 6

######For German it's: Input=Tastatur previous_pixelshader=1 (ZEHNERTASTATUR)