I changed this line:
float2 bigCoord = texCoord * float2(0.3557) + float2(0.0, 0.0 + (0.375*screen_toggle));
And made the toggle 0.0 | 1.0
Need to slightly scale down the small picture now… (which seems complicated!)
I changed this line:
float2 bigCoord = texCoord * float2(0.3557) + float2(0.0, 0.0 + (0.375*screen_toggle));
And made the toggle 0.0 | 1.0
Need to slightly scale down the small picture now… (which seems complicated!)
Alright, try it now.
Scaling down the small picture is indeed a drag. I just trial-and-error my way through it I kept the Y scaling at 1.0 and just shrunk it on the X axis because I figured sacrificing the aspect ratio a little bit was better than risking weird vertical scaling artifacts.
Nice, perfectly aligned now!
I could make it display higher scaling with this kind of trick:
shaders = "3"
shader0 = "..\shaders\handheld\shaders\color
ds-color.cg"
wrap_mode0 = "clamp_to_border"
mipmap_input0 = "false"
alias0 = ""
float_framebuffer0 = "false"
srgb_framebuffer0 = "false"
scale_type_x0 = "source"
scale_x0 = "1.000000"
scale_type_y0 = "source"
scale_y0 = "1.000000"
shader1 = "..\shaders\handheld\shaders\lcd_cgwg\lcd-grid.cg"
wrap_mode1 = "clamp_to_border"
mipmap_input1 = "false"
alias1 = ""
float_framebuffer1 = "false"
srgb_framebuffer1 = "false"
scale_type_x1 = "source"
scale_x1 = "4.000000"
scale_type_y1 = "source"
scale_y1 = "4.000000"
shader2 = "..\shaders/handheld/shaders/ds-hybrid-view.cg"
filter_linear2 = "true"
wrap_mode2 = "clamp_to_border"
mipmap_input2 = "false"
alias2 = ""
float_framebuffer2 = "false"
srgb_framebuffer2 = "false"
scale_type_x2 = "absolute"
scale_x2 = "3840"
scale_type_y2 = "absolute"
scale_y2 = "2160"
parameters = "GRID_STRENGTH;screen_toggle;aspect_correction"
GRID_STRENGTH = "0.050000"
screen_toggle = "0.000000"
aspect_correction = "1.000000"
(on a 1080p screen here that works) Ideally the code in the hybrid shader would take the oversampling into account and scale at integer scaling.
edit: I wanted to post a screenshot at x8 downscaled but it needs a 3MB png to not screw the picture lol. Anyway, the big screen is quite OK for non integer, the smaller one still shows some evident resizing artefacts (but is readable).
Odd: that’s how I unsuccessfully tried to do >2x, as well, except I only tried it with the vulkan version, so maybe there’s something going on with that version (or my GPU or my driver or…) /shrug