Skip to content

Instantly share code, notes, and snippets.

View Themaister's full-sized avatar

Hans-Kristian Arntzen Themaister

View GitHub Profile
/*
* (Inaccurate) Phosphor shader
* Author: Themaister
* Licesese: Public Domain
*/
struct coords
{
float2 coord;
float2 coord_prev;
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<head>
<title>XML Shader (1.0) Viewer</title>
</head>
<style type="text/css">
body {
background: #eeeeee;
font-family: Verdana, serif;
<html>
<head>
<title>XML Shader (1.0) Viewer</title>
</head>
<body onload="webGLStart();">
<input type="button" onclick="do_resize(0.25)" value="Scale 0.25x"/>
<input type="button" onclick="do_resize(0.5)" value="Scale 0.5x"/>
<input type="button" onclick="do_resize(1)" value="Scale 1x"/>
<input type="button" onclick="do_resize(2)" value="Scale 2x"/>
<input type="button" onclick="do_resize(3)" value="Scale 3x"/>
function load_image(evt) {
if (!(window.File && window.FileReader && window.FileList && window.Blob)) {
alert("FileReader API not supported by this browser ...");
return;
}
var file = evt.target.files[0];
if (!file.type.match("image.*")) {
alert("This is not an image file! :(");
return;
<html>
<head>
<title>WebGL shader test ...</title>
</head>
<body onload="webGLStart();">
<p>Hai! :D WebGL shader test ...</p>
<canvas id="test_canvas" style="border: none" width="1024" height="896"></canvas>
</body>
#include <portaudio.h>
#include <stdio.h>
#include <rsound.h>
#include <assert.h>
#include <signal.h>
static volatile sig_atomic_t g_alive;
static void sighandler(int sig)
{
(void)sig;
<html>
<head>
<title>WebGL test ...</title>
</head>
<body onload="webGLStart();">
<p>Hai! :D WebGL test ...</p>
<canvas id="test_canvas" style="border: none" width="640" height="480"></canvas>
</body>
<html>
<head>
<title>WebGL test ...</title>
</head>
<body onload="webGLStart();">
<p>Hai! :D WebGL test ...</p>
<canvas id="test_canvas" style="border: none" width="640" height="480"></canvas>
</body>
diff -Naur bass-old/arch/snes-cpu/snes-cpu.cpp bass/arch/snes-cpu/snes-cpu.cpp
--- bass-old/arch/snes-cpu/snes-cpu.cpp 2011-09-11 11:15:29.484243021 +0200
+++ bass/arch/snes-cpu/snes-cpu.cpp 2011-09-11 11:17:20.210914970 +0200
@@ -31,19 +31,22 @@
auto isbyte = [this]() {
if(param.wildcard("$????") || param.wildcard("$??????")) return false;
- if(!priority && param[0] != '<' && !param.wildcard("$??")) return false;
+ if(param.wildcard("0x????") || param.wildcard("0x??????")) return false;
+ if(!priority && param[0] != '<' && !param.wildcard("$??") && !param.wildcard("0x??")) return false;
<?xml version="1.0" encoding="UTF-8"?>
<shader language="GLSL">
<vertex><![CDATA[
void main()
{
gl_Position = ftransform();
gl_TexCoord[0] = gl_MultiTexCoord0;
}