Skip to content

Instantly share code, notes, and snippets.

View nbouteme's full-sized avatar

Nabil Boutemeur nbouteme

View GitHub Profile
@nbouteme
nbouteme / lens.c
Last active April 8, 2019 00:17
Lens filter using three separable complex gaussian kernels
#include <complex.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/fcntl.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <string.h>
#include <math.h>
@nbouteme
nbouteme / ss-fs.glsl
Last active June 20, 2023 09:27
Skyward Sword Brush shader. Accurately emulates what's done with TEVs in a shader. Does NOT include the blurring pass.
#version 300 es
precision highp float;
in vec2 UV;
out vec4 out_color;
uniform float ratio, time;
uniform sampler2D texture0;
const float PI_3 = 1.0471975512;
@nbouteme
nbouteme / pngcomp.c
Last active September 24, 2016 10:51
#include <byteswap.h>
#include <unistd.h>
#include <stdio.h>
#include <sys/fcntl.h>
#include <string.h>
#include <stdlib.h>
typedef struct
{
unsigned length;
CURDIR := $(shell pwd)
ifeq ($(RUNDIR),)
RUNDIR := $(CURDIR)
else
SUBFOLDERS += $(shell find $(RUNDIR) -maxdepth 1 -type d ! -path $(RUNDIR) ! -path $(RUNDIR)/config | grep -v '/\.')
endif
file_exist = $(shell test -e $1 && echo "exist")
$(if $(call file_exist,$(RUNDIR)/config/ext_make.so),\