-
Notifications
You must be signed in to change notification settings - Fork 119
/
IshiirukaFX.glsl
2199 lines (1908 loc) · 60.1 KB
/
IshiirukaFX.glsl
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
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*===============================================================================*\
|######################## [Ishiiruka FX 0.9.2] ######################||
|| Credist to: ||
|| Asmodean (DolphinFX) ||
|| Matso (MATSODOF) ||
|| Gilcher Pascal aka Marty McFly (MATSODOF original port to MCFX) ||
|| Daniel R�kos (Efficient Gaussian blur with linear sampling) ||
|| mudlord (FXAA)
|| threethan (Depth Preprocessor)
|############################ By Tino ############################|
\*===============================================================================*/
/*
[configuration]
[OptionBool]
GUIName = Depth Preprocessor
OptionName = B_DEPTH_PREPROCESS
DefaultValue = False
GUIDescription = Allows depth data to be modified before being passed to other shaders.
[OptionRangeFloat]
GUIName = Sky Cutoff
OptionName = D_SKY_CUTOFF
MinValue = 0.1
MaxValue = 1.0
StepAmount = 0.01
DefaultValue = 1.0
GUIDescription = Any pixel above this depth will be treated as having a depth of "Sky Depth"
DependentOption = B_DEPTH_PREPROCESS
[OptionRangeFloat]
GUIName = Sky Depth
OptionName = D_SKY_DEPTH
MinValue = 0.0
MaxValue = 1.0
StepAmount = 0.01
DefaultValue = 0.0
GUIDescription = Any pixel above this "Sky Cutoff" will be treated as having this depth
DependentOption = B_DEPTH_PREPROCESS
[OptionRangeFloat]
GUIName = Global Depth Multiplier
OptionName = D_GLOBAL_DEPTH_MULT
MinValue = 0.5
MaxValue = 1.5
StepAmount = 0.1
DefaultValue = 1.0
GUIDescription = All pixels' depths will be multiplied by this value
DependentOption = B_DEPTH_PREPROCESS
[OptionBool]
GUIName = SSAO
OptionName = A_SSAO_ENABLED
DefaultValue = false
ResolveAtCompilation = True
GUIDescription = Enables Screen Space Ambient Occlusion. Creates shadow on visuals.
GUIDescription.SPA = Habilita la Oclusi�n Ambiental.
[OptionBool]
GUIName = Ambient Occlusion Only
GUIName.SPA = Solo Oclusi�n Ambiental
OptionName = A_SSAO_ONLY
DefaultValue = False
GUIDescription = Displays SSAO/SSGI ambient color only.
GUIDescription.SPA = Muestra solo el componente de Oclusi�n Ambiental.
[OptionRangeFloat]
GUIName = Occlusion Multiplier
OptionName = C_AOAMULT
MinValue = 0.1
MaxValue = 1.5
StepAmount = 0.01
DefaultValue = 1.0
GUIDescription = Multiplier to SSAO and SSGI effects
[OptionRangeFloat]
GUIName = Occlusion Attenuation Start
GUIName.SPA = Inicio de atenuaci�n en la oclusi�n.
OptionName = C_AOASTART
MinValue = 0.0
MaxValue = 0.4
StepAmount = 0.01
DefaultValue = 0.4
GUIDescription = Depth where the attenuation to the SSAO effect starts.
GUIDescription.SPA = Profundidad a partir de la cual se comienza a atenuar la Oclusi�n Ambiental.
[OptionRangeFloat]
GUIName = Occlusion Attenuation End
GUIName.SPA = Final de atenuaci�n en la oclusi�n.
OptionName = D_AOAEND
MinValue = 0.5
MaxValue = 2.0
StepAmount = 0.01
DefaultValue = 2.0
GUIDescription = Depth where the SSAO attenuation ends, after this value no SSAO is applied.
GUIDescription.SPA = Profundidad a partir de la cual finaliza la aplicaci�n de la Oclusi�n Ambiental.
[OptionBool]
GUIName = SSGI
OptionName = A_SSAO_SSGI_ENABLED
DefaultValue = false
ResolveAtCompilation = True
DependentOption = A_SSAO_ENABLED
GUIDescription = Enables Screen Space Global Ilumination simulation.
GUIDescription.SPA = Habilita la simulaci�n de Iluminaci�n global.
[OptionRangeInteger]
GUIName = SSAO Quality
GUIName.SPA = Calidad SSAO
OptionName = B_SSAO_SAMPLES
MinValue = 16
MaxValue = 64
StepAmount = 4
DefaultValue = 24
DependentOption = A_SSAO_ENABLED
ResolveAtCompilation = True
GUIDescription = Number of samples used to calculate SSAO component, large values gives more quality but may cause performance drops.
GUIDescription.SPA = Cantidad de muestras utilizadas para el calculo del componente de oclusi�n, valores muly altos producen una mejor calidad pero pueden acarrear una perdida de performance.
[OptionRangeFloat]
GUIName = Sample Range
GUIName.SPA = Rango de Muestras
OptionName = C_SAMPLE_RANGE
MinValue = 0.001
MaxValue = 0.04
StepAmount = 0.0001
DefaultValue = 0.0064
DependentOption = A_SSAO_ENABLED
GUIDescription = Max distance from the center sample.
GUIDescription.SPA = Distancia maxima de las muestras a partir de la muestra central.
[OptionRangeFloat]
GUIName = Filter Limit
GUIName.SPA = Limite de Filtrado
OptionName = D_FILTER_LIMIT
MinValue = 0.001
MaxValue = 0.01
StepAmount = 0.0001
DefaultValue = 0.0026
DependentOption = A_SSAO_ENABLED
GUIDescription = Amount of filtering applyed to the AO component.
GUIDescription.SPA = Intensidad de filtrado aplicada al Componente de Oclusi�n.
[OptionRangeFloat]
GUIName = Max Depth
GUIName.SPA = Profundidad Maxima
OptionName = E_MAX_DEPTH
MinValue = 0.0001
MaxValue = 0.02
StepAmount = 0.0001
DefaultValue = 0.0132
DependentOption = A_SSAO_ENABLED
[OptionRangeFloat]
GUIName = Min Depth
GUIName.SPA = Profundidad Minima
OptionName = F_MIN_DEPTH
MinValue = 0.0
MaxValue = 0.02
StepAmount = 0.0001
DefaultValue = 0.0003
DependentOption = A_SSAO_ENABLED
[OptionBool]
GUIName = SSGI
OptionName = A_SSGI_ENABLED
DefaultValue = false
ResolveAtCompilation = True
[OptionRangeInteger]
GUIName = SSGI Samples
OptionName = iSSGISamples
MinValue = 5
MaxValue = 24
StepAmount = 1
DefaultValue = 10
DependentOption = A_SSGI_ENABLED
ResolveAtCompilation = True
[OptionRangeFloat]
GUIName = Sample Range
OptionName = fSSGISamplingRange
MinValue = 5.0
MaxValue = 80.0
StepAmount = 0.1
DefaultValue = 40.0
DependentOption = A_SSGI_ENABLED
[OptionRangeFloat]
GUIName = Ilumination Multiplier
OptionName = fSSGIIlluminationMult
MinValue = 1.0
MaxValue = 8.0
StepAmount = 0.1
DefaultValue = 2.0
DependentOption = A_SSGI_ENABLED
[OptionRangeFloat]
GUIName = Occlusion Multiplier
OptionName = fSSGIOcclusionMult
MinValue = 1.0
MaxValue = 10.0
StepAmount = 0.1
DefaultValue = 2.0
DependentOption = A_SSGI_ENABLED
[OptionRangeFloat]
GUIName = Model Thickness
OptionName = fSSGIModelThickness
MinValue = 0.5
MaxValue = 100.0
StepAmount = 0.1
DefaultValue = 7.5
DependentOption = A_SSGI_ENABLED
[OptionRangeFloat]
GUIName = Saturation
OptionName = fSSGISaturation
MinValue = 0.2
MaxValue = 2.0
StepAmount = 0.01
DefaultValue = 1.5
DependentOption = A_SSGI_ENABLED
[OptionRangeFloat]
GUIName = AO Sharpness
OptionName = AO_SHARPNESS
MinValue = 0.1
MaxValue = 5.0
StepAmount = 0.01
DefaultValue = 0.75
DependentOption = A_SSGI_ENABLED
[OptionBool]
GUIName = Ambient Only
OptionName = A_AO_ONLY
DefaultValue = False
DependentOption = A_SSGI_ENABLED
[OptionBool]
GUIName = Ilumination Only
OptionName = A_ILUMINATION_ONLY
DefaultValue = False
DependentOption = A_SSGI_ENABLED
[OptionBool]
GUIName = MATSO DOF
OptionName = MATSODOF
DefaultValue = false
GUIDescription = Obscures visuals to give appearance of depth.
[OptionBool]
GUIName = Use depth range focus
OptionName = DOF_A_FOCUSPOINT_RANGE
DefaultValue = false
DependentOption = MATSODOF
[OptionRangeFloat]
GUIName = Focus Point
OptionName = DOF_B_FOCUSPOINT
MinValue = 0.0, 0.0
MaxValue = 1.0, 1.0
DefaultValue = 0.5, 0.5
StepAmount = 0.01, 0.01
DependentOption = MATSODOF
[OptionBool]
GUIName = Enable Near Blur
OptionName = DOF_B_NEARBLUR
DefaultValue = true
GUIDescription = Enables blur of objects closer than the focus point
DependentOption = MATSODOF
[OptionBool]
GUIName = Enable Far Blur
OptionName = DOF_B_FARBLUR
DefaultValue = true
GUIDescription = Enables blur of objects further than the focus point
DependentOption = MATSODOF
[OptionRangeFloat]
GUIName = Near Blur Curve
OptionName = DOF_NEARBLURCURVE
MinValue = 0.4
MaxValue = 2.0
DefaultValue = 0.7
StepAmount = 0.01
DependentOption = MATSODOF
[OptionRangeFloat]
GUIName = Far Blur Curve
OptionName = DOF_FARBLURCURVE
MinValue = 0.4
MaxValue = 2.0
DefaultValue = 1.5
StepAmount = 0.01
DependentOption = MATSODOF
[OptionRangeFloat]
GUIName = Blur Radius
OptionName = DOF_BLURRADIUS
MinValue = 5.0
MaxValue = 50.0
DefaultValue = 5.0
StepAmount = 1.0
DependentOption = MATSODOF
[OptionRangeInteger]
GUIName = Vignette
OptionName = DOF_VIGNETTE
MinValue = 0
MaxValue = 1000
DefaultValue = 400
StepAmount = 10
DependentOption = MATSODOF
[OptionBool]
GUIName = CROMA Enable
OptionName = bMatsoDOFChromaEnable
DefaultValue = True
DependentOption = MATSODOF
[OptionRangeFloat]
GUIName = Chroma Pow
OptionName = fMatsoDOFChromaPow
MinValue = 0.2
MaxValue = 3.0
DefaultValue = 1.4
StepAmount = 0.01
DependentOption = MATSODOF
[OptionRangeFloat]
GUIName = Bokeh Curve
OptionName = fMatsoDOFBokehCurve
MinValue = 0.5
MaxValue = 20.0
DefaultValue = 8.0
StepAmount = 0.01
DependentOption = MATSODOF
[OptionRangeFloat]
GUIName = Bokeh Light
OptionName = fMatsoDOFBokehLight
MinValue = 0.0
MaxValue = 2.0
DefaultValue = 0.012
StepAmount = 0.001
DependentOption = MATSODOF
[OptionRangeInteger]
GUIName = Bokeh Quality
OptionName = iMatsoDOFBokehQuality
MinValue = 1
MaxValue = 10
DefaultValue = 4
StepAmount = 1
DependentOption = MATSODOF
ResolveAtCompilation = True
[OptionRangeInteger]
GUIName = Bokeh Angle
OptionName = fMatsoDOFBokehAngle
MinValue = 0
MaxValue = 360
DefaultValue = 0
StepAmount = 1
DependentOption = MATSODOF
[OptionBool]
GUIName = Pixel Vibrance
OptionName = H_PIXEL_VIBRANCE
DefaultValue = true
[OptionRangeFloat]
GUIName = Vibrance
OptionName = A_VIBRANCE
MinValue = -0.50
MaxValue = 1.00
StepAmount = 0.01
DefaultValue = 0.24
DependentOption = H_PIXEL_VIBRANCE
[OptionRangeFloat]
GUIName = RedVibrance
OptionName = B_R_VIBRANCE
MinValue = -1.00
MaxValue = 4.00
StepAmount = 0.01
DefaultValue = 1.00
DependentOption = H_PIXEL_VIBRANCE
[OptionRangeFloat]
GUIName = GreenVibrance
OptionName = C_G_VIBRANCE
MinValue = -1.00
MaxValue = 4.00
StepAmount = 0.01
DefaultValue = 1.00
DependentOption = H_PIXEL_VIBRANCE
[OptionRangeFloat]
GUIName = BlueVibrance
OptionName = D_B_VIBRANCE
MinValue = -1.00
MaxValue = 4.00
StepAmount = 0.01
DefaultValue = 1.00
DependentOption = H_PIXEL_VIBRANCE
[OptionBool]
GUIName = Scene Tonemapping
OptionName = C_TONEMAP_PASS
DefaultValue = false
[OptionRangeInteger]
GUIName = TonemapType
OptionName = A_TONEMAP_TYPE
MinValue = 0
MaxValue = 3
StepAmount = 1
DefaultValue = 1
DependentOption = C_TONEMAP_PASS
[OptionRangeInteger]
GUIName = FilmOperator
OptionName = A_TONEMAP_FILM
MinValue = 0
MaxValue = 1
StepAmount = 1
DefaultValue = 1
DependentOption = C_TONEMAP_PASS
[OptionRangeFloat]
GUIName = ToneAmount
OptionName = B_TONE_AMOUNT
MinValue = 0.05
MaxValue = 2.00
StepAmount = 0.01
DefaultValue = 0.30
DependentOption = C_TONEMAP_PASS
[OptionRangeFloat]
GUIName = FilmStrength
OptionName = B_TONE_FAMOUNT
MinValue = 0.00
MaxValue = 1.00
StepAmount = 0.01
DefaultValue = 0.5
DependentOption = C_TONEMAP_PASS
[OptionRangeFloat]
GUIName = BlackLevels
OptionName = C_BLACK_LEVELS
MinValue = 0.00
MaxValue = 1.00
StepAmount = 0.01
DefaultValue = 0.06
DependentOption = C_TONEMAP_PASS
[OptionRangeFloat]
GUIName = Exposure
OptionName = D_EXPOSURE
MinValue = 0.50
MaxValue = 1.50
StepAmount = 0.01
DefaultValue = 1.00
DependentOption = C_TONEMAP_PASS
[OptionRangeFloat]
GUIName = Luminance
OptionName = E_LUMINANCE
MinValue = 0.50
MaxValue = 1.50
StepAmount = 0.01
DefaultValue = 1.00
DependentOption = C_TONEMAP_PASS
[OptionRangeFloat]
GUIName = WhitePoint
OptionName = F_WHITEPOINT
MinValue = 0.50
MaxValue = 1.50
StepAmount = 0.01
DefaultValue = 1.00
DependentOption = C_TONEMAP_PASS
[OptionBool]
GUIName = Texture Sharpen
OptionName = G_TEXTURE_SHARPEN
DefaultValue = true
[OptionRangeFloat]
GUIName = SharpenStrength
OptionName = A_SHARPEN_STRENGTH
MinValue = 0.00
MaxValue = 2.00
StepAmount = 0.01
DefaultValue = 1.04
DependentOption = G_TEXTURE_SHARPEN
[OptionRangeFloat]
GUIName = SharpenClamp
OptionName = B_SHARPEN_CLAMP
MinValue = 0.005
MaxValue = 0.250
StepAmount = 0.001
DefaultValue = 0.047
DependentOption = G_TEXTURE_SHARPEN
[OptionRangeFloat]
GUIName = SharpenBias
OptionName = C_SHARPEN_BIAS
MinValue = 1.00
MaxValue = 4.00
StepAmount = 0.05
DefaultValue = 2.00
DependentOption = G_TEXTURE_SHARPEN
[OptionRangeInteger]
GUIName = ShowEdgeMask
OptionName = D_SEDGE_DETECTION
MinValue = 0
MaxValue = 1
StepAmount = 1
DefaultValue = 0
DependentOption = G_TEXTURE_SHARPEN
[OptionBool]
GUIName = Fog
OptionName = F_FOG
DefaultValue = False
[OptionRangeFloat]
GUIName = Density
OptionName = C_FDENSITY
MinValue = 0.0
MaxValue = 1.0
StepAmount = 0.01
DefaultValue = 0.5
DependentOption = F_FOG
[OptionRangeFloat]
GUIName = Start
OptionName = A_FSTART
MinValue = 0.0
MaxValue = 0.5
StepAmount = 0.01
DefaultValue = 0.0
DependentOption = F_FOG
[OptionRangeFloat]
GUIName = End
OptionName = B_FEND
MinValue = 0.5
MaxValue = 2.0
StepAmount = 0.01
DefaultValue = 2.0
DependentOption = F_FOG
[OptionRangeFloat]
GUIName = Color
OptionName = D_FCOLOR
MinValue = 0.0, 0.0, 0.0
MaxValue = 1.0, 1.0, 1.0
StepAmount = 0.01, 0.01, 0.01
DefaultValue = 0.8, 0.9, 1.0
DependentOption = F_FOG
[OptionBool]
GUIName = Bloom
OptionName = D_BLOOM
DefaultValue = true
GUIDescription = Increases "bloom" effect. Tends to increase brightness which can be corrected under saturation.
[OptionBool]
GUIName = Bloom Only
OptionName = A_BLOOMONLY
DefaultValue = false
DependentOption = D_BLOOM
[OptionRangeFloat]
GUIName = Bloom Width
OptionName = A_BLOOMWIDTH
MinValue = 0.5
MaxValue = 3.0
StepAmount = 0.01
DefaultValue = 1.0
DependentOption = D_BLOOM
[OptionRangeFloat]
GUIName = Bloom Power
OptionName = B_BLOOMPOWER
MinValue = 1.0
MaxValue = 8.0
StepAmount = 0.1
DefaultValue = 3.0
DependentOption = D_BLOOM
[OptionRangeFloat]
GUIName = Bloom Intensity
OptionName = C_BLOOMINTENSITY
MinValue = 0.1
MaxValue = 1.0
StepAmount = 0.01
DefaultValue = 0.27
DependentOption = D_BLOOM
[OptionBool]
GUIName = Light Scattering
OptionName = D_SCATTERRING
DefaultValue = False
DependentOption = D_BLOOM
[OptionRangeFloat]
GUIName = Density
OptionName = E_SDENSITY
MinValue = 0.0
MaxValue = 1.0
StepAmount = 0.01
DefaultValue = 0.5
DependentOption = D_BLOOM
[OptionRangeFloat]
GUIName = Start
OptionName = F_SSTART
MinValue = 0.0
MaxValue = 0.5
StepAmount = 0.01
DefaultValue = 0.0
DependentOption = D_BLOOM
[OptionRangeFloat]
GUIName = End
OptionName = G_SEND
MinValue = 0.5
MaxValue = 2.0
StepAmount = 0.01
DefaultValue = 2.0
DependentOption = D_BLOOM
[OptionRangeFloat]
GUIName = Default Color
OptionName = H_SCOLOR
MinValue = 0.1, 0.1, 0.1
MaxValue = 1.0, 1.0, 1.0
StepAmount = 0.01, 0.01, 0.01
DefaultValue = 0.8, 0.9, 1.0
DependentOption = D_BLOOM
[OptionRangeFloat]
GUIName = Scattering Intensity
OptionName = I_SINTENSITY
MinValue = 0.0
MaxValue = 4.0
StepAmount = 0.01
DefaultValue = 0.1
DependentOption = D_BLOOM
[OptionBool]
GUIName = Gaussian AnamFlare
OptionName = C_GAUSSIAN_ANAMFLARE
DefaultValue = false
GUIDescription = Enable to apply a horizontal light beam to bright pixels.
[OptionRangeFloat]
GUIName = Threshhold
OptionName = A_ANAMFLARE_THRESHOLD
MinValue = 0.10
MaxValue = 1.00
StepAmount = 0.01
DefaultValue = 0.90
DependentOption = C_GAUSSIAN_ANAMFLARE
GUIDescription = Every pixel brighter than this value gets a flare.
[OptionRangeFloat]
GUIName = Wideness
OptionName = A_ANAMFLARE_WIDENESS
MinValue = 0.5
MaxValue = 4.0
StepAmount = 0.1
DefaultValue = 3.0
DependentOption = C_GAUSSIAN_ANAMFLARE
GUIDescription = Horizontal wideness of flare. Don't set too high, otherwise the single samples are visible
[OptionRangeFloat]
GUIName = Amount
OptionName = B_ANAMFLARE_AMOUNT
MinValue = 1.0
MaxValue = 10.0
StepAmount = 0.1
DefaultValue = 5.0
DependentOption = C_GAUSSIAN_ANAMFLARE
GUIDescription = Intensity of anamorphic flare.
[OptionRangeFloat]
GUIName = Curve
OptionName = B_ANAMFLARE_CURVE
MinValue = 1.0
MaxValue = 2.0
StepAmount = 0.1
DefaultValue = 1.2
DependentOption = C_GAUSSIAN_ANAMFLARE
GUIDescription = Intensity curve of flare with distance from source
[OptionRangeFloat]
GUIName = Colors
OptionName = C_ANAMFLARE_COLOR
MinValue = 0.0, 0.0, 0.0
MaxValue = 1.0, 1.0, 1.0
StepAmount = 0.01, 0.01, 0.01
DefaultValue = 0.012, 0.313, 0.588
DependentOption = C_GAUSSIAN_ANAMFLARE
GUIDescription = R, G and B components of anamorphic flare. Flare is always same color.
[OptionBool]
GUIName = Barrel Distortion
OptionName = E_BARREL
DefaultValue = false
GUIDescription = Bends output video. Used to emulate the effect of CRT monitors on modern hardware.
[OptionRangeFloat]
GUIName = Lens Center Offset
OptionName = u_lensCenterOffset
MinValue = -1.0, -1.0
MaxValue = 1.0, 1.0
StepAmount = 0.001, 0.001
DefaultValue = 0.0, 0.0
DependentOption = E_BARREL
[OptionRangeFloat]
GUIName = Distortion
OptionName = u_distortion
MinValue = 0.0, 0.0, 0.0, 0.0
MaxValue = 1.0, 1.0, 1.0, 1.0
StepAmount = 0.001, 0.001, 0.001, 0.001
DefaultValue = 1.0, 0.22, 0.0, 0.24
DependentOption = E_BARREL
[OptionBool]
GUIName = FXAA
OptionName = A_FXAA_PASS
DefaultValue = false
[OptionRangeFloat]
GUIName = SubpixelMax
OptionName = A_FXAA_SUBPIX_MAX
MinValue = 0.00
MaxValue = 1.00
StepAmount = 0.01
DefaultValue = 0.25
DependentOption = A_FXAA_PASS
[OptionRangeFloat]
GUIName = EdgeThreshold
OptionName = B_FXAA_EDGE_THRESHOLD
MinValue = 0.010
MaxValue = 0.500
StepAmount = 0.001
DefaultValue = 0.050
DependentOption = A_FXAA_PASS
[OptionRangeInteger]
GUIName = ShowEdgeDetection
OptionName = C_FXAA_SHOW_EDGES
MinValue = 0
MaxValue = 1
StepAmount = 1
DefaultValue = 0
DependentOption = A_FXAA_PASS
[Pass]
EntryPoint = AmbientOcclusion
DependantOption = A_SSAO_ENABLED
DependantOption = A_SSGI_ENABLED
OutputScale = 0.5
Input0=ColorBuffer
Input0Filter=Linear
Input0Mode=Clamp
Input1=DepthBuffer
Input1Filter=Nearest
Input1Mode=Clamp
[Pass]
EntryPoint = AOBlur
DependantOption = A_SSAO_ENABLED
DependantOption = A_SSGI_ENABLED
OutputScale = 0.5
Input0=PreviousPass
Input0Filter=Linear
Input0Mode=Clamp
Input1=DepthBuffer
Input1Filter=Nearest
Input1Mode=Clamp
[Pass]
EntryPoint = Merger
Input0=ColorBuffer
Input0Filter=Linear
Input0Mode=Clamp
Input1=DepthBuffer
Input1Filter=Nearest
Input1Mode=Clamp
Input2=PreviousPass
Input2Filter=Linear
Input2Mode=Clamp
[Pass]
EntryPoint = A_ReduceSize
DependantOption = D_BLOOM
OutputScale = 0.5
Input0=PreviousPass
Input0Filter=Linear
Input0Mode=Clamp
[Pass]
EntryPoint = BloomHwithAnamFlare
DependantOption = D_BLOOM
OutputScale = 0.25
Input0=PreviousPass
Input0Filter=Linear
Input0Mode=Clamp
[Pass]
EntryPoint = BloomV
DependantOption = D_BLOOM
OutputScale = 0.25
Input0=PreviousPass
Input0Filter=Linear
Input0Mode=Clamp
[Pass]
EntryPoint = BloomHwithAnamFlare
DependantOption = D_BLOOM
OutputScale = 0.125
Input0=PreviousPass
Input0Filter=Linear
Input0Mode=Clamp
[Pass]
EntryPoint = BloomVwithAnamFlare
DependantOption = D_BLOOM
OutputScale = 0.125
Input0=PreviousPass
Input0Filter=Linear
Input0Mode=Clamp
[Pass]
EntryPoint = BloomScatering
DependantOption = D_BLOOM
OutputScale = 0.03125
Input0=PreviousPass
Input0Filter=Linear
Input0Mode=Clamp
[Pass]
EntryPoint = BloomMerger
DependantOption = D_BLOOM
Input0=Pass2
Input0Filter=Linear
Input0Mode=Clamp
Input1=Pass7
Input1Filter=Nearest
Input1Mode=Clamp
Input2=Pass8
Input2Filter=Linear
Input2Mode=Clamp
Input3=DepthBuffer
Input3Filter=Nearest
Input3Mode=Clamp
[Pass]
EntryPoint = PS_DOF_MatsoDOF1
DependantOption = MATSODOF
Input0=PreviousPass
Input0Filter=Linear
Input0Mode=Clamp
Input1=DepthBuffer
Input1Filter=Nearest
Input1Mode=Clamp
[Pass]
EntryPoint = PS_DOF_MatsoDOF2
DependantOption = MATSODOF
Input0=PreviousPass
Input0Filter=Linear
Input0Mode=Clamp
Input1=DepthBuffer
Input1Filter=Nearest
Input1Mode=Clamp
[Pass]
EntryPoint = PS_DOF_MatsoDOF3
DependantOption = MATSODOF
Input0=PreviousPass
Input0Filter=Linear
Input0Mode=Clamp
Input1=DepthBuffer
Input1Filter=Nearest
Input1Mode=Clamp
[Pass]
EntryPoint = PS_DOF_MatsoDOF4
DependantOption = MATSODOF
Input0=PreviousPass
Input0Filter=Linear
Input0Mode=Clamp
Input1=DepthBuffer
Input1Filter=Nearest
Input1Mode=Clamp
[Pass]
EntryPoint = Barrel_distortion
DependantOption = E_BARREL
Input0=PreviousPass
Input0Filter=Linear
Input0Mode=Clamp
[/configuration]
*/
/* ------------------- Depth Preprocessor -------------------- */
float preprocess_depth(float depth)
{
if GetOption(B_DEPTH_PREPROCESS) {
if (depth > GetOption(D_SKY_CUTOFF)) {
return GetOption(D_SKY_DEPTH);
} else {
return depth * GetOption(D_GLOBAL_DEPTH_MULT);
}
} else {
return depth;
}
}
float PSampleDepth(){
return preprocess_depth(SampleDepth());
}
float PSampleDepthOffset(int2 a){
return preprocess_depth(SampleDepthOffset(a));
}
float PSampleDepthLocation(int2 a){
return preprocess_depth(SampleDepthLocation(a));
}
float3 GetNormalFromDepth(float fDepth)
{
float depth1 = SampleDepthOffset(int2(0, 1));
float depth2 = SampleDepthOffset(int2(1, 0));
float2 invres = GetInvResolution();
float3 p1 = float3(0, invres.y, depth1 - fDepth);
float3 p2 = float3(invres.x, 0, depth2 - fDepth);
float3 normal = cross(p1, p2);
normal.z = -normal.z;
return normalize(normal);
}
float4 BilateralX(float depth)
{
float limit = GetOption(D_FILTER_LIMIT);
float count = 1.0;
float4 value = SamplePrev();
float Weight = min(sign(limit - abs(SampleDepthOffset(int2(-3, 0)) - depth)) + 1.0, 1.0);
value += SamplePrevOffset(int2(-3, 0)) * Weight;
count += Weight;
Weight = min(sign(limit - abs(SampleDepthOffset(int2(-2, 0)) - depth)) + 1.0, 1.0);
value += SamplePrevOffset(int2(-2, 0)) * Weight;
count += Weight;
Weight = min(sign(limit - abs(SampleDepthOffset(int2(-1, 0)) - depth)) + 1.0, 1.0);
value += SamplePrevOffset(int2(-1, 0)) * Weight;
count += Weight;
Weight = min(sign(limit - abs(SampleDepthOffset(int2(1, 0)) - depth)) + 1.0, 1.0);
value += SamplePrevOffset(int2(1, 0)) * Weight;
count += Weight;
Weight = min(sign(limit - abs(SampleDepthOffset(int2(2, 0)) - depth)) + 1.0, 1.0);
value += SamplePrevOffset(int2(2, 0)) * Weight;
count += Weight;
Weight = min(sign(limit - abs(SampleDepthOffset(int2(3, 0)) - depth)) + 1.0, 1.0);
value += SamplePrevOffset(int2(3, 0)) * Weight;
count += Weight;
return value / count;
}
float4 BilateralY(float depth)
{
float limit = GetOption(D_FILTER_LIMIT);
float count = 1.0;
float4 value = SamplePrev();
float Weight = min(sign(limit - abs(SampleDepthOffset(int2(0, -3)) - depth)) + 1.0, 1.0);
value += SamplePrevOffset(int2(0, -3)) * Weight;
count += Weight;
Weight = min(sign(limit - abs(SampleDepthOffset(int2(0, -2)) - depth)) + 1.0, 1.0);
value += SamplePrevOffset(int2(0, -2)) * Weight;
count += Weight;
Weight = min(sign(limit - abs(SampleDepthOffset(int2(0, -1)) - depth)) + 1.0, 1.0);
value += SamplePrevOffset(int2(0, -1)) * Weight;
count += Weight;
Weight = min(sign(limit - abs(SampleDepthOffset(int2(0, 1)) - depth)) + 1.0, 1.0);
value += SamplePrevOffset(int2(0, 1)) * Weight;
count += Weight;
Weight = min(sign(limit - abs(SampleDepthOffset(int2(0, 2)) - depth)) + 1.0, 1.0);
value += SamplePrevOffset(int2(0, 2)) * Weight;
count += Weight;
Weight = min(sign(limit - abs(SampleDepthOffset(int2(0, 3)) - depth)) + 1.0, 1.0);
value += SamplePrevOffset(int2(0, 3)) * Weight;
count += Weight;
return value / count;
}
float3 GetEyePosition(float2 uv, float eye_z, float2 InvFocalLen) {
uv = (uv * float2(2.0, -2.0) - float2(1.0, -1.0));
float3 pos = float3(uv * InvFocalLen * eye_z, eye_z);