Skip to content

Instantly share code, notes, and snippets.

View haxiomic's full-sized avatar
:octocat:
Everything is happening

George Corney haxiomic

:octocat:
Everything is happening
View GitHub Profile
@sketchpunk
sketchpunk / arcball.js
Last active July 22, 2023 06:24
Maths for various camera movement ( Orbit, Arcball, FPS, Zoom, etc )
/** Using a faux sphere in screen space, determine the arc transform to orbit
* the camera around a target position. A continuous orientation will
* be provided for further calls.
*/
function arcBallTransform(
scrSize, // Screen size, vec2
scrPos0, // Starting mouse position, vec2
scrPos1, // Ending Mouse Positiong, vec2
rotOrientation, // Current arc orientation, quaternion
targetPos, // Position to orbit around
@PiMaker
PiMaker / Phalanx.cs
Last active June 9, 2024 13:57
Avatar Phalanx - A way to upload multiple versions of a VRChat avatar with a single click
/*
Made by _pi_ in VRChat/@pimaker on GitHub
Usage:
* Make an empty GameObject
* "Add Component" a Phalanx
* Drop in your Avatar Descriptor
* Click "Get Data From Avatar"
* Get your Avatar ID from the pipeline component beneath the avatar descriptor
* Optionally: Set up a thumbnail and an overlay text to superimpose onto it dynamically
@dwilliamson
dwilliamson / MarchingCubes.js
Last active July 1, 2024 11:43
Marching Cubes Lookup Tables
//
// Lookup Tables for Marching Cubes
//
// These tables differ from the original paper (Marching Cubes: A High Resolution 3D Surface Construction Algorithm)
//
// The co-ordinate system has the more convenient properties:
//
// i = cube index [0, 7]
// x = (i & 1) >> 0
// y = (i & 2) >> 1
global.THREE = require("three");
const canvasSketch = require('canvas-sketch');
const Random = require('canvas-sketch-util/random');
const gradientHeight = 512;
const settings = {
dimensions: [ 2048, gradientHeight * 2 ]
};

Haxe FrontEnd

Reads haxelib-lock.json (if exists)

Reads <file> (if called with -lock-file <file>) which will partially override haxelib-lock.json

Takes arguments (hxml files or anything else)

Expand hxml files to their actual content

@pixelsnafu
pixelsnafu / CloudsResources.md
Last active July 10, 2024 08:04
Useful Resources for Rendering Volumetric Clouds

Volumetric Clouds Resources List

  1. A. Schneider, "Real-Time Volumetric Cloudscapes," in GPU Pro 7: Advanced Rendering Techniques, 2016, pp. 97-127. (Follow up presentations here, and here.)

  2. S. Hillaire, "Physically Based Sky, Atmosphere and Cloud Rendering in Frostbite" in Physically Based Shading in Theory and Practice course, SIGGRAPH 2016. [video] [course notes] [scatter integral shadertoy]

  3. [R. Högfeldt, "Convincing Cloud Rendering – An Implementation of Real-Time Dynamic Volumetric Clouds in Frostbite"](https://odr.chalmers.se/hand

--server-connect

Haxe 4.0 introduces a new way of communicating IDE and the compiler.

Here's what an IDE needs to do:

  • start a TCP server on some port (can pass 0 to bind to any available one)
  • start haxe --server-connect <port> where <port> is replaced with the port number the started TCP server was bound to.
  • haxe will connect to that server and await requests, ensure that happens
  • send messages of the following structure:
@mikhailov-work
mikhailov-work / turbo_colormap.glsl
Last active February 19, 2024 22:18
Turbo Colormap Polynomial Approximation in GLSL
// Copyright 2019 Google LLC.
// SPDX-License-Identifier: Apache-2.0
// Polynomial approximation in GLSL for the Turbo colormap
// Original LUT: https://gist.github.com/mikhailov-work/ee72ba4191942acecc03fe6da94fc73f
// Authors:
// Colormap Design: Anton Mikhailov (mikhailov@google.com)
// GLSL Approximation: Ruofei Du (ruofei@google.com)
@andy-thomason
andy-thomason / Genomics_A_Programmers_Guide.md
Created May 14, 2019 13:32
Genomics a programmers introduction

Genomics - A programmer's guide.

Andy Thomason is a Senior Programmer at Genomics PLC. He has been witing graphics systems, games and compilers since the '70s and specialises in code performance.

https://www.genomicsplc.com