Skip to content

Instantly share code, notes, and snippets.

r(t)^2 = x(t)^2 + y(t)^2 + z(t)^2
x(t+h) = x(t) + h * f(t) * -x(t) / r(t)^2
y(t+h) = y(t) + h * f(t) * -y(t) / r(t)^2
z(t+h) = z(t) + h * f(t) * -z(t) / r(t)^2
x(t+h) - x(t) = h * f(t) * -x(t)/r(t)^2
x'(t) = -f(t)x(t)/r(t)^2
#version 120
#if defined(VERTEX)
#if __VERSION__ >= 130
#define COMPAT_VARYING out
#define COMPAT_ATTRIBUTE in
#define COMPAT_TEXTURE texture
#else
#define COMPAT_VARYING varying
#version 120
#if defined(VERTEX)
#if __VERSION__ >= 130
#define COMPAT_VARYING out
#define COMPAT_ATTRIBUTE in
#define COMPAT_TEXTURE texture
#else
#define COMPAT_VARYING varying
@Sgeo
Sgeo / simuleyes_sbs_auto.glsl
Created February 18, 2023 09:03
Work in progress on DOSBox-X shader to conver SimulEyes -> SBS
#version 120
// Developed by tyrells
// Based on Marat Tanalin's algorithm: https://tanalin.com/en/articles/integer-scaling/
uniform vec2 rubyInputSize;
#if defined(VERTEX)
#if __VERSION__ >= 130
@Sgeo
Sgeo / opengl_vr_from_chatgpt.c
Created December 4, 2022 02:41
This code was written by ChatGPT
#include <Windows.h>
#include <MinHook.h>
#include <GL/gl.h>
#include <GL/glext.h>
#include <OVR_CAPI_GL.h>
// Declaration of the original function.
typedef void (__stdcall *glBegin_t)(GLenum);
glBegin_t original_glBegin;
effect focus<a>
ctl focus(a : a): a
fun vl-fst(f: a -> focus<r> b): (((a, c)) -> focus<r> (b, c))
fn(pair)
match pair
(a, c) -> (f(a), c)
fun vl-snd(f: a -> focus<r> b): (((c, a)) -> focus<r> (c, b))
fn(pair)
@Sgeo
Sgeo / mastervolume.js
Created January 5, 2021 21:41
Add a setVolume() function to affect all AudioContexts
// Based on https://github.com/notthetup/webaudio-volume-control/blob/master/mastervolume.js
(function() {
window.setVolume = function(){};
let origAudioContextConstructor = window.AudioContext;
window.AudioContext = function(options) {
let origAudioContext = new origAudioContextConstructor(options);
let masterGain = origAudioContext.createGain();
masterGain.connect(origAudioContext.destination);
let origSetVolume = window.setVolume;
@Sgeo
Sgeo / irixswextract.c
Last active August 11, 2020 01:55 — forked from camthesaxman/irixswextract.c
tool to extract IRIX software packages
#include <ctype.h>
#include <errno.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
struct Archive
LEGAL DISCLAIMER
This product is meant for educational purposes only. Any resemblance to real persons, living or dead is purely coincidental. Void where prohibited. Some assembly required. Batteries not included. Contents may settle during shipment. Use only as directed. No other warranty expressed or implied. Do not use while operating a motor vehicle or heavy machinery. This is not an offer to sell securities. Apply only to affected area. May be too intense for some viewers. Do not stamp. For recreational use only. Do not disturb. All models over 18 years of age. No user-serviceable parts inside. Freshest if eaten before date on carton. Subject to change without notice. Times approximate. Simulated picture. Please remain seated until the ride has come to a complete stop. Breaking seal constitutes acceptance of agreement. For off-road use only. As seen on TV. One size fits all. Contains a substantial amount of non-tobacco ingredients. Colors may, in time, fade. Slippery when wet.
For office use only. Not
@Sgeo
Sgeo / notes.md
Last active February 5, 2020 07:25
Flashpoint VRML Notes

Blaxxun 4.4

  • Place files somewhere under ActiveX
  • Use startActiveX.bat

Live3D

  • Apache's mime.types VRML model/vrml -> x-world/x-vrml. Live3D does not mark itself as understanding model/vrml
  • basilisk-portable's ini MOZ_PLUGIN_PATH includes FP_VRML_PATH. Batch file sets
  • Set PATH to include DLLs, so they're visible.

Cosmo

  • CosmoPlayer installer seems to call regsvr32 on some of the DLLs. Replicate. See what other devs say.
  • All DLLs copied under VRML/Cosmo211/