Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Replicating Cathode retro terminal effect?

Tags:

c++

sdl

I'm trying to replicate the effect of Cathode but i'm not really aware of any rendering effects in SDL. Does anyone know the technique used in Cathode? Are they using OpenGL and shaders maybe?

like image 796
vinnylinux Avatar asked Dec 03 '13 17:12

vinnylinux


3 Answers

If you are still interested in the subject I'm working on a similar project. The effects were obtained by using GLSL shaders. You can grab the source code here: https://github.com/Swordifish90/cool-old-term/

The shaders strings might not be extremely readable due to the extensive use of the ternary operators (needed to customize the appearance) but they should give you a really good idea.

like image 67
Swordfish90 Avatar answered Nov 14 '22 07:11

Swordfish90


If you poke around a bit in the application bundle, you'll find that the only relevant framework is GLKit which, according to Apple, will "reduce the effort required to create new shader-based apps".

There's also a bunch of ".fragdata", ".vertdata", and ".glsldata" files, which are encrypted.
Very unfortunate for you.

So I would say: Yes, it's OpenGL shaders all the way.

Unfortunately, since the shaders are encrypted, you're going to have to locate suitable algorithms elsewhere. (Perhaps it's possible to use the OpenGL debugging and profiling tools to capture the shader source as it is compiled, but I doubt it.)

like image 42
molbdnilo Avatar answered Nov 14 '22 08:11

molbdnilo


You may have realized that Android phones have (had?) such animations when you put them to sleep. That code is available under in file named ElectronBeam.java.

However it is Java code and uses GLES 1.0 with GLES 1.1 Extenstions but algorithm for bending screen should be understandable.

like image 1
auselen Avatar answered Nov 14 '22 09:11

auselen