Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scan-line + Image-Flip (image-adjustment.glsl) #88

Closed
oneswitch opened this issue Apr 23, 2019 · 8 comments
Closed

Scan-line + Image-Flip (image-adjustment.glsl) #88

oneswitch opened this issue Apr 23, 2019 · 8 comments

Comments

@oneswitch
Copy link

I'd love to find a way to get the image-adjustment.glsl shader able to mirror a game screen (e.g. Space Invaders) and apply scan-lines. This to fit into a real Space Invaders machine with half-silvered mirror.

If I use 2 shaders and the scanline.glsl it's okay.

But I was really hoping to get something as nice as the crt-pi-vertical.glsl / crt-pi.glsl shaders working properly. However when you use these (with flipping) it doesn't work well. You get a a sickly pink scanline, instead of a black scanline.

@hizzlekizzle
Copy link
Collaborator

Have you tried putting the image-adjustment shader first?

@oneswitch
Copy link
Author

oneswitch commented Apr 24, 2019 via email

@hizzlekizzle
Copy link
Collaborator

Hmm, no problems here. Can you post a screenshot of what it's going wrong on your end and maybe a little more info on what you're wanting? Should it look like this?

image

@oneswitch
Copy link
Author

oneswitch commented Apr 25, 2019

You have it nearly perfect, although it should also be flipped horizontally...

SCANS

I'm using a Rasberry Pi with RetroPie. If I use a single shader (crt-pi-vertical) it gives a nice scan-lines effect with black gaps as below...

GOOD1
GOOD2

... If I use the flipping shader....

IMG_20190425_090729034

..., no matter what order I put it in, I get no gaps, but a sickly pink effect.

BAD FLIPPED

@hizzlekizzle
Copy link
Collaborator

Does this do what you want? (the paths are set to work from your 'presets' directory; name it something ending in .glslp):

shaders = "2"
shader0 = "../misc/image-adjustment.glsl"
filter_linear0 = "false"
wrap_mode0 = "clamp_to_border"
mipmap_input0 = "false"
alias0 = ""
float_framebuffer0 = "true"
srgb_framebuffer0 = "false"
scale_type_x0 = "source"
scale_x0 = "1.000000"
scale_type_y0 = "source"
scale_y0 = "1.000000"
shader1 = "../crt/shaders/crt-pi.glsl"
filter_linear1 = "false"
wrap_mode1 = "clamp_to_border"
mipmap_input1 = "false"
alias1 = ""
float_framebuffer1 = "true"
srgb_framebuffer1 = "false"
parameters = "ia_target_gamma;ia_monitor_gamma;ia_overscan_percent_x;ia_overscan_percent_y;ia_saturation;ia_contrast;ia_luminance;ia_black_level;ia_bright_boost;ia_R;ia_G;ia_B;ia_ZOOM;ia_XPOS;ia_YPOS;ia_TOPMASK;ia_BOTMASK;ia_LMASK;ia_RMASK;ia_GRAIN_STR;ia_SHARPEN;ia_FLIP_HORZ;ia_FLIP_VERT;CURVATURE_X;CURVATURE_Y;MASK_BRIGHTNESS;SCANLINE_WEIGHT;SCANLINE_GAP_BRIGHTNESS;BLOOM_FACTOR;INPUT_GAMMA;OUTPUT_GAMMA"
ia_target_gamma = "2.200000"
ia_monitor_gamma = "2.200000"
ia_overscan_percent_x = "0.000000"
ia_overscan_percent_y = "0.000000"
ia_saturation = "1.000000"
ia_contrast = "1.000000"
ia_luminance = "1.000000"
ia_black_level = "0.000000"
ia_bright_boost = "0.000000"
ia_R = "1.000000"
ia_G = "1.000000"
ia_B = "1.000000"
ia_ZOOM = "1.000000"
ia_XPOS = "0.000000"
ia_YPOS = "0.000000"
ia_TOPMASK = "0.000000"
ia_BOTMASK = "0.000000"
ia_LMASK = "0.000000"
ia_RMASK = "0.000000"
ia_GRAIN_STR = "0.000000"
ia_SHARPEN = "0.000000"
ia_FLIP_HORZ = "1.000000"
ia_FLIP_VERT = "1.000000"
CURVATURE_X = "0.100000"
CURVATURE_Y = "0.150000"
MASK_BRIGHTNESS = "0.700000"
SCANLINE_WEIGHT = "6.000000"
SCANLINE_GAP_BRIGHTNESS = "0.120000"
BLOOM_FACTOR = "1.500000"
INPUT_GAMMA = "2.400000"
OUTPUT_GAMMA = "2.200000"

@oneswitch
Copy link
Author

oneswitch commented Apr 27, 2019

That's much better thank you!

There's still a slight green/pink tinge (maybe something to do with my monitor), but it's much better than it was.

@hizzlekizzle
Copy link
Collaborator

Does that get you fixed up? Should we close this issue?

@oneswitch
Copy link
Author

Yes, thank you. Top job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants