Skip to content

Commit f335871

Browse files
committed
Small readme fixes
1 parent 9e74313 commit f335871

File tree

2 files changed

+28
-4
lines changed

2 files changed

+28
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ It can be configured with many parameters, so that can be
55
scaled to run on even on modest gpus while still developed to
66
run with heavier presets on at least Haswell+ iGpus.<br>
77
While it is not meant to simulate the internal behaviour of CRT displays,<br>
8-
it aims to give users "visual" parameters to make their monitors to look similar.<br>
8+
it aims to give users "visual" parameters to make their monitors look similar.<br>
99
Several presets are included.<br>
1010

11-
***Actually it provides emulation for:***
11+
***Actually, it provides emulation for:***
1212
* Scanlines
1313
* Screenlines
1414
* RGB phosphors

shaders/final_pass.slang

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,34 @@ vec4 main_wrap() {
5858
vec3 pixel_out = pixel_in.rgb;
5959
vec3 bloomed;
6060

61+
//Curvature
62+
vec2 coords = vTexCoord ;
63+
float l_GEOM_BORDER_WX = GEOM_BORDER_WX;
64+
float l_GEOM_BORDER_WY = GEOM_BORDER_WY;
65+
float fborder = 1.0;
66+
67+
if (DO_CURVATURE == 1.0) {
68+
if ((GEOM_WARP_X > 0.0) || (GEOM_WARP_Y > 0.0))
69+
coords = Warp(coords,GEOM_WARP_X,GEOM_WARP_Y);
70+
71+
vec2 border_coords = coords;
72+
if (GEOM_BORDER_WX < 0.0) l_GEOM_BORDER_WX = GEOM_WARP_X;
73+
if (GEOM_BORDER_WY < 0.0) l_GEOM_BORDER_WY = GEOM_WARP_Y;
74+
75+
if ((GEOM_BORDER_WX > 0.0) || (GEOM_BORDER_WY > 0.0))
76+
border_coords = Warp(vTexCoord,l_GEOM_BORDER_WX,l_GEOM_BORDER_WY);
77+
78+
if ((GEOM_ZOOMOUT + GEOM_GAP_SIZE) > 0.0) {
79+
coords = zoomout_coords(border_coords, GEOM_ZOOMOUT, 1.0);
80+
border_coords = zoomout_coords(border_coords, GEOM_ZOOMOUT-GEOM_GAP_SIZE, 1.0);
81+
}
82+
fborder = border(border_coords);
83+
}
84+
6185
//Mix bloom texture
6286
if (DO_BLOOM == 1.0 ) {
63-
bloomed=texture(bloom_pass_final, vTexCoord).rgb ;
64-
87+
bloomed=texture(bloom_pass_final, coords).rgb ;
88+
6589
if ( bloom_on_dark_only == 1.0) {
6690
//float source_whiteness = (pixel_out.r+pixel_out.g+pixel_out.b) /3;
6791
float source_whiteness = (pixel_out.r+pixel_out.g+pixel_out.b);

0 commit comments

Comments
 (0)