GithubHelp home page GithubHelp logo

00mjk / crt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from svofski/crt

0.0 0.0 0.0 3.92 MB

Software composite PAL modulation/demodulation experiments

Python 51.96% GLSL 37.58% Gnuplot 0.16% Go 10.28% Shell 0.02%

crt's Introduction

Software composite video modulation/demodulation experiments

The idea is to reproduce in GLSL shaders realistic composite-like artifacting by applying PAL modulation and demodulation. Digital texture, passed through the model of an analog channel, should suffer same effects as its analog counterpart and exhibit properties, such as dot crawl and colour bleeding, that may be desirable for faithful reproduction of look and feel of old computer games.

The project contains 2 main parts: purely software simulation, and GLSL shader implementation. The GLSL part consists of a Python host which can be used to experiment with fragment shaders in general, and the shaders themselves.

Shaders

Currently there are 3 different implementations of composite shader that aim to reproduce the same model.

mpass

3-stage processing:

  1. modulate source RGB signal to B&W image
  2. demodulate U and V, pass (Modulated, U, V) in (R,G,B) channels
  3. lowpass filter UV at baseband, remodulate again and subtract from Modulated to recover Luma. Convert back to RGB

oversampling

SDLMESS uses very small textures for multipass shading, which makes them not very practical for purposes of storing intermediate values. This method is an attempt to pack 2x more intermediate values in unused texture channels. It differs from mpass in that it passes U,V,U,V in (RGBA), thus packing 2x more bandwidth in same amount of pixels.

singlepass

I was afraid that this method would be very slow because a lot of things are calculated over and over again for the purpose of filtering. But it seems to be doing fine even on slower GPUs. This is the best method. Because it has no intermediate passes, it takes colour signal samples at 4x colour subcarrier frequency regardless of source texture resolution.

Requirements:

  • Software-only model: Python 2.7, PyPNG
  • GLSL model: Python 2.7, PyGame, PyOpenGL

SDLMESS/SDLMAME compatibility

This toy is designed with SDLMESS compatibility in mind, so shaders designed with it can be used with SDLMESS almost without modifications.

Acknowledgements

crt's People

Contributors

svofski avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.