Few notes about my shader:
I push algorithm complexity to memory. So the GLSL code is very basic. Big part of my work rely on the texture creation. This texture pack 2 types of data:
1) a high quality photo stored in Blue channel. (luminance is enough to capture screen features)
2) a displacement map in Red and Green channels. (X and Y components of displacement vector)
Concerning part 1. I wrote an iOS APP in order to:
Shoot in Adobe DNG raw format. JPEG is unusable, as the demosaicing algorithm used from bayer sensor generate moire. I use RawTherapee software in order to obtain a correct PNG image. I disable a lot of corrections and use a suitable demosaicing algorithm.
Control manually focal distance, ISO, exposure. I control these parameters with my gamepad while my smartphone is fixed on tripod. This aims to minimize vibrations and blur.
Maximize accuracy of shoot by drawing on image preview a TV pattern (rectangle)
Concerning part 2. I wrote an OSX app in order to map TV pixels on RetroArch Core framebuffer pixels. The TV resolution is 439x232.5 @240p. I wrote details about this resolution in related topic (Phosphor lanes and PCB screw tuning). My app help me to follow scanlines and columns of TV. I use Quadratic Bezier curves to describe edges of TV pixels. Many people say "CRT pixels are rectangle": it's quite true :) The pixel bounding box is rectangle. As a CRT screen is a paraboloid, pixels that are projected on it are bound to a section of conic surface. I map by hand 102287 pixels !!! (With help of my OSX App) The texture bundled to this shader encode at the same time warping and position in original framebuffer.
Shader features can be found in related topic : What’s the best way to introduce a new shader?
Reviewers:
Few notes about my shader: I push algorithm complexity to memory. So the GLSL code is very basic. Big part of my work rely on the texture creation. This texture pack 2 types of data: 1) a high quality photo stored in Blue channel. (luminance is enough to capture screen features) 2) a displacement map in Red and Green channels. (X and Y components of displacement vector)
Concerning part 1. I wrote an iOS APP in order to:
Concerning part 2. I wrote an OSX app in order to map TV pixels on RetroArch Core framebuffer pixels. The TV resolution is 439x232.5 @240p. I wrote details about this resolution in related topic (Phosphor lanes and PCB screw tuning). My app help me to follow scanlines and columns of TV. I use Quadratic Bezier curves to describe edges of TV pixels. Many people say "CRT pixels are rectangle": it's quite true :) The pixel bounding box is rectangle. As a CRT screen is a paraboloid, pixels that are projected on it are bound to a section of conic surface. I map by hand 102287 pixels !!! (With help of my OSX App) The texture bundled to this shader encode at the same time warping and position in original framebuffer.