Skip to content

Instantly share code, notes, and snippets.

View mariodivece's full-sized avatar

Mario Di Vece mariodivece

View GitHub Profile
@mariodivece
mariodivece / mad-scanlines-crt.glsl
Last active December 13, 2024 08:22
CRT Scanline Effect for Dolphin Emulator
void main()
{
float currentMillis = GetTime() / float(1000.0);
float2 coords = GetCoordinates();
float lineCount = GetWindowResolution().y / 2.0;
// scanlines
int lineIndex = int( ( coords.y + currentMillis * 0.5 ) * lineCount );
#ifdef API_OPENGL
float lineIntensity = mod(float(lineIndex), 2);
@mariodivece
mariodivece / StringEx.hh
Last active December 27, 2023 12:56
A C++ string class designed for embedded systems
// online dev: https://www.onlinegdb.com/online_c++_compiler
#include <cstring>
#include <iostream>
#include <cstdarg>
#include <algorithm>
using namespace std;
class StringEx {