-
Notifications
You must be signed in to change notification settings - Fork 129
/
DX9Settings.ini
414 lines (366 loc) · 12.5 KB
/
DX9Settings.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
[General]
; May need 64bit helix mod!
; UseRenderedShaders=true is nearly always useful, because it trims the
; list of shaders seen while hunting down to just those active in the
; current scene. Disable this only if you get crashes during hunting.
UseRenderedShaders=true
; DumpAll will generate ASM text files for every shader seen by the game.
; This is usually worth doing once, but not useful for every run.
DumpAll=true
; Less crashes when reloading shaders:
OverrideMethod = 2
; Force square surfaces (shadow maps) to be mono:
DefSquareSurfaceMode = 2
; Allow access to the view size in pixel shaders to calculate the pixel
; position on screen. This isn't usually necessary in the generic lighting fix,
; but sometimes a situation arises where it is necessary.
DefPSViewSizeConst = 210
PresetsKeysList = 0;B;C;D;E;
; Mouse doesn't work with if Helix mod inits it
InitMouse = false
; Might help with flashlight clipping (seems pretty rare even without this)
SkipSetScissorRect = true
; Access Const1 from shaders:
DefVSConst1 = 200
DefPSConst1 = 200
; To track down texture CRCs with up/down:
bCalcTexCRCAtStart = true
; Stereoise surfaces related to the camera. This is necessary as the fixed
; shaders have no way to tell if they are being rendered in stereo or mono, so
; the stereo fix breaks them if they are rendered on the camera in mono. If the
; camera is also 3D this is not an issue (the other option would be to set
; separation to 0 whenever the camera is out - Below key binding Q does this):
SurfaceCreationModeList = 0;1;
DepthStencilSurfaceModeList = 0;
[SF0]
; Stereoise Camera RGB
; D3DUSAGE_RENDERTARGET/D3DUSAGE_DEPTHSTENCIL Height 1024 Width 1024 Usage 1 Format 21 Pool 0 Levels 1 texptr 0 nIndex 1, Mode 1
Height = 1024
Width = 1024
Usage = 1
Format = 21
Pool = 0
Levels = 1
DefMode = 1
[SF1]
; Seems to be related to the camera depth target (guessing the depth buffer is copied to this surface)
; D3DUSAGE_RENDERTARGET/D3DUSAGE_DEPTHSTENCIL Height 1024 Width 1024 Usage 2 Format 1515474505 Pool 0 Levels 1 texptr 0 nIndex 0, Mode 2
Height = 1024
Width = 1024
Usage = 2
Format = 1515474505
Pool = 0
DefMode = 1
[DS0]
; Stereoise Camera Depth target
; CreateDepthStencilSurface Format 80, Width 1024, Height 1024, Format 80, MultiSample 0, MultisampleQuality 0 Mode 2 Index 0
Width = 1024
Height = 1024
Format = 80
DefMode = 1
; Hold Q to set separation to 0 to effectively disable 3D, for use with menus,
; which are 3D by default and nowhere near the scene plane. I was previously
; using this with the camera as well, but unless the switch was automated that
; was too annoying.
[KEY0]
Key = 81
Presets = 0;1;
Type = 2
[PRES0]
; 0% separation, effectively disabling 3D (nVidia seems to pick 1% as a
; minimum, so there is still a small amount of pop, but broken surfaces look
; mostly fine):
UseSepSettings = true
Separation = 0x00000000
[PRES1]
; 100% separation, 0.11 convergence (camera is comfortable even without Q), allow saving this preset:
UseSepSettings = true
SaveSepSettings = true
UseByDef = true
Separation = 0x42c80000
Convergence = 0x3de147ae
; Hold I to set Const2
[KEYC]
Key = 73
Presets = D;E;
Type = 2
[PRESD]
Const2 = 0x3f800000
[PRESE]
Const2 = 0x00000000
; Hold O to set Const3
[KEYD]
Key = 79
Presets = F;10;
Type = 2
[PRESF]
Const3 = 0x3f800000
[PRES10]
Const3 = 0x00000000
; Hold P to set Const4
[KEYE]
Key = 80
Presets = 11;12;
Type = 2
[PRES11]
Const4 = 0x3f800000
[PRES12]
Const4 = 0x00000000
; Copy the MVP and inverted MV matrices to all lighting shaders to allow us to
; calculate the projection matrix and find the horizontal FOV. This technique
; was first used to fix Dreamfall Chapters - take a look at the forum thread
; for that game and it's fix for more details on how this works.
; The projection matrix will be calculated from the matrices passed into the
; lighting shader whenever possible. This is not possible for directional
; lighting or other times it is drawing a full-screen quad, so we must also
; find other shaders to get the MV+MVP matrices from in that case. The below
; shader is a pretty common one in Unity games that we can use, but you may
; need to find others (avoid UI shaders that often do not have a valid
; projection matrix). My extract_unity_headers.py script is useful to find
; other shaders that can be used here.
; These seem to be very unreliable to get the FOV in this game - due to the FOV
; change when the camera is out (but even the shadows outside the camer get
; mucked up). Mostly just going to use the lighting shader which seems to be
; reliable most of the time.
[VS0875ED8E]
; Matched 2 variants of 2 shaders: Lightbeam/Lightbeam, Lightbeam/Lightbeam Soft
UseMatrix = true
GetMatrixFromReg = 0
InverseMatrix = true
GetConst1FromReg = 4
[VS09BE39E5]
; Matched 2 variants of 1 shaders: DreadOut/DreadOut-Ghost_dissolve
UseMatrix = true
GetMatrixFromReg = 0
InverseMatrix = true
GetConst1FromReg = 4
[VS0D2263A1]
; Matched 6 variants of 3 shaders: Diffuse, Specular, Transparent/Cutout/Diffuse
UseMatrix = true
GetMatrixFromReg = 0
InverseMatrix = true
GetConst1FromReg = 4
[VS1E6D3AF7]
; Matched 2 variants of 1 shaders: Custom/fog-off
UseMatrix = true
GetMatrixFromReg = 0
InverseMatrix = true
GetConst1FromReg = 4
[VS21E7C809]
; OG + 450B68A2) | Matched 2 variants of 2 shaders: Lightbeam/Lightbeam Detail, Lightbeam/Lightbeam Detail Soft
UseMatrix = true
GetMatrixFromReg = 0
InverseMatrix = true
GetConst1FromReg = 4
[VS37F3571C]
; Matched 2 variants of 1 shaders: Custom/ColorMapUltra_SimpleBumpedSpecReflective
UseMatrix = true
GetMatrixFromReg = 0
InverseMatrix = true
GetConst1FromReg = 4
[VS3ED6B323]
; Matched 4 variants of 2 shaders: Hidden/TerrainEngine/Splatmap/Lightmap-AddPass, Nature/Terrain/Diffuse
UseMatrix = true
GetMatrixFromReg = 0
InverseMatrix = true
GetConst1FromReg = 4
[VS450B68A2]
; Matched 2 variants of 2 shaders: Lightbeam/Lightbeam Detail, Lightbeam/Lightbeam Detail Soft
UseMatrix = true
GetMatrixFromReg = 0
InverseMatrix = true
GetConst1FromReg = 4
[VS5136457D]
; Matched 2 variants of 1 shaders: Hidden/TerrainEngine/Details/Vertexlit
UseMatrix = true
GetMatrixFromReg = 0
InverseMatrix = true
GetConst1FromReg = 4
[VS5B2CD52B]
; Matched 10 variants of 5 shaders: Decal/Cutout Bumped Diffuse, Decal/Mobile/Cutout Bumped Diffuse, DreadOut Shaders/DreadOut Dissolve, DreadOut/DreadOut-Decal_VertexLit_cutout, DreadOut/Transparent/Diffuse/Bumped/Cutout/DoubleSided
UseMatrix = true
GetMatrixFromReg = 0
InverseMatrix = true
GetConst1FromReg = 4
[VS61CAF50F]
; Unity headers extracted from Particle Alpha Blend.shader
UseMatrix = true
GetMatrixFromReg = 0
InverseMatrix = true
GetConst1FromReg = 4
[VS6264350F]
; Matched 10 variants of 5 shaders: Custom/DreadOut_Diffuse_Background, Decal/Cutout Diffuse, Decal/Mobile/Cutout Diffuse, DreadOut/DreadOut-SS_Shader, DreadOut/Transparent/Cutout_Diffuse
UseMatrix = true
GetMatrixFromReg = 0
InverseMatrix = true
GetConst1FromReg = 4
[VS724027D6]
; Matched 4 variants of 2 shaders: Decal/Cutout Target Bumped Diffuse, Decal/Mobile/Cutout Target Bumped Diffuse
UseMatrix = true
GetMatrixFromReg = 0
InverseMatrix = true
GetConst1FromReg = 4
[VS7A062DE4]
; Matched 2 variants of 1 shaders: DreadOut/DreadOut-Decal_VertexLit
UseMatrix = true
GetMatrixFromReg = 0
InverseMatrix = true
GetConst1FromReg = 4
[VS83DFFA75]
; Matched 2 variants of 1 shaders: Custom/ColorMapUltra_SimpleBumpedSpecReflective
UseMatrix = true
GetMatrixFromReg = 0
InverseMatrix = true
GetConst1FromReg = 4
[VS9BA28350]
; Matched 16 variants of 1 shaders: Terrain/Terrain Colormap Ultra U4
UseMatrix = true
GetMatrixFromReg = 0
InverseMatrix = true
GetConst1FromReg = 4
[VSA1680770]
; Matched 6 variants of 3 shaders: DreadOut/Diffuse_Rim_noSpec, Example/Rim, Example/RimEmission
UseMatrix = true
GetMatrixFromReg = 0
InverseMatrix = true
GetConst1FromReg = 4
[VSA3ECDE5B]
; Matched 2 variants of 1 shaders: Hidden/TerrainEngine/Details/WavingDoublePass
UseMatrix = true
GetMatrixFromReg = 0
InverseMatrix = true
GetConst1FromReg = 4
[VSAAC55B49]
; Matched 6 variants of 3 shaders: Decal/Colored/Cutout Diffuse Colored, Decal/Mobile/Colored/Cutout Diffuse Colored, DreadOut/Road
UseMatrix = true
GetMatrixFromReg = 0
InverseMatrix = true
GetConst1FromReg = 4
[VSC5E0F5ED]
; Matched 2 variants of 1 shaders: Diffuse Detail
UseMatrix = true
GetMatrixFromReg = 0
InverseMatrix = true
GetConst1FromReg = 4
[VSC79B8090]
; Matched 4 variants of 2 shaders: Decal/Colored/Cutout Bumped Diffuse Colored, Decal/Mobile/Colored/Cutout Bumped Diffuse Colored
UseMatrix = true
GetMatrixFromReg = 0
InverseMatrix = true
GetConst1FromReg = 4
[VSCFD314D3]
; Matched 2 variants of 1 shaders: DreadOut/DreadOut Bumped Diffuse Detail
UseMatrix = true
GetMatrixFromReg = 0
InverseMatrix = true
GetConst1FromReg = 4
[VSD81BE285]
; Unity headers extracted from MotionBlurClear.shader
UseMatrix = true
GetMatrixFromReg = 0
InverseMatrix = true
GetConst1FromReg = 4
[VSDB0CA882]
; Matched 2 variants of 1 shaders: Hidden/TerrainEngine/Details/BillboardWavingDoublePass
UseMatrix = true
GetMatrixFromReg = 0
InverseMatrix = true
GetConst1FromReg = 4
[VSEEF7726D]
; Matched 4 variants of 2 shaders: Decal/Colored/Cutout Target Bumped Diffuse Colored, Decal/Mobile/Colored/Cutout Target Bumped Diffuse Colored
UseMatrix = true
GetMatrixFromReg = 0
InverseMatrix = true
GetConst1FromReg = 4
[VSFE53F77B]
; Matched 2 variants of 1 shaders: Example/Rim_dust
UseMatrix = true
GetMatrixFromReg = 0
InverseMatrix = true
GetConst1FromReg = 4
[VSFFD20EF3]
; Matched 16 variants of 1 shaders: Custom/ColorMapUltra_MeshTerrainBlend Shader
UseMatrix = true
GetMatrixFromReg = 0
InverseMatrix = true
GetConst1FromReg = 4
; Additional possible MV+MVP sources that don't have any other fix (need to be
; added to ShaderOverride to use these - remember to fix fog or leave as vs_2_0):
;[VS4AA396AE]
;; TreeSoftOcclusionLeaves.shader
;UseMatrix = true
;GetMatrixFromReg = 0
;InverseMatrix = true
;GetConst1FromReg = 4
;
;[VS59D14DE2]
;; Unity headers extracted from TreeSoftOcclusionBark.shader
;UseMatrix = true
;GetMatrixFromReg = 0
;InverseMatrix = true
;GetConst1FromReg = 4
; Lighting vertex shaders to copy the matrices to. We used to also copy them to
; the pixel shaders, but now we pass them from the vertex shaders to the pixel
; shaders instead, which makes it easier to tweak the FOV source on a game by
; game basis.
[VSDF7A050C]
; Unity Hidden/Internal-PrePassLighting.shader - ***VERTEX SHADER FOR ALL VARIANTS***
; This shader will use it's own MV+MVP matrices when they are valid (still need
; to use Helix mod to inverse the MV matrix), and the passed in ones when they
; are not:
UseMatrix = true
MatrixReg = 180
SetConst1ToReg = 190
; Get the MV matrix passed from the game to this shader and invert it:
UseMatrix1 = true
GetMatrixFromReg1 = 0
InverseMatrix1 = true
MatrixReg1 = 184
GetConst2FromReg = 4
; Also take the last column as a more reliable way to test if the matrix is valid:
GetConst3FromReg = 7
[VSBAEDDED5]
; Unity Hidden/Internal-PrePassCollectShadows.shader - ***VERTEX SHADER FOR ALL VARIANTS***
; This shader is used for directional lighting, and must always have an
; alternate source of the MV+MVP matrices passed to it.
; Note: This shader has an MVP matrix, but not the matching MV matrix.
UseMatrix = true
MatrixReg = 180
SetConst1ToReg = 190
; Also copy the matrices in from the lighting shader, which seems more reliable
; than the other sources whenever the phone camera is out:
UseMatrix1 = true
MatrixReg1 = 184
SetConst2ToReg = 194
SetConst3ToReg = 197
[VS8A07B021]
; Match book texture in pause menu, which needs to be adjusted slightly to
; better line up with the UI:
; 62949867 - book
; 1769BBBB - camera phone screen (used to detect when alternate shadow FOV correction is required)
CheckTexCRC = true
VBOffsetList = 0;
TexCounterReg = 251
ValNotDefined = 0
ValForDefined = 1
UseDefinedOnly = false
DefinedTexturesVS = 62949867;1769BBBB;
[VB8A07B021.0]
[TEX1769BBBB]
; Cameraphone screen is active
Index = 0
PresIndex = 2
[PRES2]
Const1 = 0x3f800000
[VS2E8D2E8D]
; Vignette + some other UI elements
; 7A2E13EA - Red Vignette
; DACD0D6D - Haze
CheckTexCRC = true
VBOffsetList = 0;
TexCounterReg = 251
ValNotDefined = 0
ValForDefined = 1
UseDefinedOnly = false
DefinedTexturesVS = 7A2E13EA;DACD0D6D;
[VB2E8D2E8D.0]