• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

shaders/H24-Feb-2020-7,9616,355

2xBR-lv1-multipass.slangpH A D24-Feb-2020197 96

README.mdH A D24-Feb-20204.4 KiB9962

super-2xbr-3d-2p.slangpH A D24-Feb-2020441 1715

super-2xbr-3d-3p-smoother.slangpH A D24-Feb-2020614 2321

super-4xbr-3d-4p.slangpH A D24-Feb-2020787 2927

super-4xbr-3d-6p-smoother.slangpH A D24-Feb-20201.1 KiB4139

super-8xbr-3d-6p.slangpH A D24-Feb-20201.1 KiB4139

super-xbr-2p.slangpH A D24-Feb-2020433 1715

super-xbr-3p-smoother.slangpH A D24-Feb-2020602 2321

super-xbr-6p-adaptive.slangpH A D24-Feb-20201.2 KiB4543

super-xbr-6p-small-details.slangpH A D24-Feb-20201.2 KiB4543

super-xbr-6p.slangpH A D24-Feb-20201.1 KiB4240

super-xbr-deposterize.slangpH A D24-Feb-20202.3 KiB8382

xbr-hybrid.slangpH A D24-Feb-2020287 1411

xbr-lv2-3d.slangpH A D24-Feb-202070 43

xbr-lv2.slangpH A D24-Feb-202070 53

xbr-lv3-multipass.slangpH A D24-Feb-2020197 96

xbr-lv3.slangpH A D24-Feb-202070 53

xbr-mlv4-multipass.slangpH A D24-Feb-2020874 3832

README.md

1xBR Shaders
2=======
3These shaders uses the xBR algorithm to scale. xBR (scale by rules) works by detecting edges and interpolating pixels along them. It has some empyrical rules developed to detect the edges in many directions. There are many versions implemented and they differs basically by the number of directions considered and the way interpolations are done.
4
5xbr-lvl1-noblend.cg
6--------------
7
8The most basic xBR shader. Level 1 means it only detects two edge directions (45� and 135�). The interpolation doesn't blend pixel colors. It uses the most similar color from one of its neighbors. So, the final result uses the original color palette. And because of that, it only works properly at odd scale factors (3x, 5x, 7x...).
9
10Recommended sampling: `Point`
11Recommended scale factors: `multiple odd scale factors`
12
13xbr-lvl2-noblend.cg
14--------------
15
16An evolution from last shader. Level 2 means it can detect four edge directions, which shows as better rounded objects on screen. The interpolation doesn't blend pixel colors. It uses the most similar color from one of its neighbors. So, the final result uses the original color palette. And because of that, it only works properly at odd scale factors (3x, 5x, 7x...).
17
18Recommended sampling: `Point`
19Recommended scale factors: `multiple odd scale factors`
20
21xbr-lvl2.cg
22--------------
23
24It can detect four edge directions, which shows as better rounded objects on screen. The interpolation blends pixel colors, so that the final image is smoother than the noblend versions. It works well in any integer scale factor.
25
26Recommended sampling: `Point`
27Recommended scale factors: `Integer multiples`
28
29xbr-lvl2-multipass.cg
30--------------
31
32It's the same as the last one. But this one divides the calculations among multiple shaders. So, this one is faster than the single versions.
33
34Recommended sampling: `Point`
35Recommended scale factors: `Integer multiples`
36
37xbr-lvl2-fast.cg
38--------------
39
40This is a simplified lvl2 implementation. Much faster than the standard version, though it sacrifices some quality.
41
42Recommended sampling: `Point`
43Recommended scale factors: `Integer multiples`
44
45xbr-lvl3-noblend.cg
46--------------
47
48Level 3 means it can detect six edge directions, which shows as better rounded objects on screen. The interpolation doesn't blend pixel colors. It uses the most similar color from one of its neighbors. So, the final result uses the original color palette. And because of that, it only works properly at odd scale factors (3x, 5x, 7x...).
49
50Recommended sampling: `Point`
51Recommended scale factors: `multiple odd scale factors`
52
53xbr-lvl3.cg
54--------------
55
56It can detect six edge directions, which shows as even better rounded objects on screen than the lvl2. The interpolation blends pixel colors, so that the final image is smoother than the noblend versions. It works well in any integer scale factor.
57
58Recommended sampling: `Point`
59Recommended scale factors: `Integer multiples`
60
61xbr-lvl3-multipass.cg
62--------------
63
64It's the same as the last one. But this one divides the calculations among multiple shaders. So, this one is faster than the single versions.
65
66Recommended sampling: `Point`
67Recommended scale factors: `Integer multiples`
68
69xbr-mlv4-multipass.cg
70--------------
71
72This shader is the latest evolution of the standard xBR algorithm. It can can detect eight edge directions, which shows as better rounded objects on screen. Besides, it has a non-greedy selection of edges internally, which means it doesn't automatically chooses to interpolate along the steeper edge. The interpolation blends pixel colors, so that the final image is smoother than the noblend versions. It works well in any integer scale factor.
73
74Recommended sampling: `Point`
75Recommended scale factors: `Integer multiples`
76
77xbr-hybrid.cg
78--------------
79
80This shader combines xBR with reverse-aa. It's recommended for games with smooth color gradients.
81
82Recommended sampling: `Point`
83
84super-xbr-2p.cg
85--------------
86
87Super-xBR uses parts of the xBR algorithm and combines with other linear interpolation ones. It is intended for games with smooth color gradients. Compared to the hybrid ones, Super-xBR provides a much better image, without discontinuities.
88
89Recommended sampling: `Point`
90Recommended scale factors: `Integer multiples`
91
92super-xbr-3p-smoother.cg
93--------------
94
95The same as the last one with an additional step to increase smoothness. This one provides even better image quality, though a bit slower.
96
97Recommended sampling: `Point`
98Recommended scale factors: `Integer multiples`
99