Themaister / slang-shaders

44 stars 100 forks source link

New shader based on Sony CRT TV Trinitron KV-M1420B #5

Closed yo6snap closed 5 years ago

yo6snap commented 5 years ago

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.

yo6snap commented 5 years ago

Something went wrong sorry ...