Skip to content

Instantly share code, notes, and snippets.

View trentpolack's full-sized avatar

Trent Polack trentpolack

View GitHub Profile
@romainguy
romainguy / d_ggx.glsl
Last active October 26, 2023 06:18
D_GGX in mediump/half float
// From https://github.com/google/filament
float D_GGX(float linearRoughness, float NoH, const vec3 h) {
// Walter et al. 2007, "Microfacet Models for Refraction through Rough Surfaces"
// In mediump, there are two problems computing 1.0 - NoH^2
// 1) 1.0 - NoH^2 suffers floating point cancellation when NoH^2 is close to 1 (highlights)
// 2) NoH doesn't have enough precision around 1.0
// Both problem can be fixed by computing 1-NoH^2 in highp and providing NoH in highp as well
// However, we can do better using Lagrange's identity:
@trentpolack
trentpolack / particle-swarm-webgl-geometry-buffers-gpu-noise.markdown
Last active July 22, 2017 22:10
Particle Swarm (WebGL + Geometry Buffers + GPU Noise)

Particle Swarm (WebGL + Geometry Buffers + GPU Noise)

Just a whole bunch of particles being rendered through geometry buffers (and modified on the GPU); also working on some better GPU-accelerated noise.

hugs, trent

A Pen by Trent Polack on CodePen.

License.

@dmnsgn
dmnsgn / WebGL-WebGPU-frameworks-libraries.md
Last active May 14, 2025 09:52
A collection of WebGL and WebGPU frameworks and libraries

A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.

Engines and libraries ⚙️

Name Stars Last Commit Description
three.js ![GitHub
anonymous
anonymous / index.haml
Created December 24, 2016 18:16
Instagram
%header#header
%h1 INSTAGRAM
%p Display your Instagram photos on your website with a little Javascript.
%section#content

#Quixel Megascans Scripting Reference ###Updated: Aug 19th, 2016

The Megascans Bridge allows the user to send assets from the Bridge to external applications. The Bridge currently supports the following tools:

  • 3DS Max
  • Marmoset Toolbag 2
  • Unity 3d
  • Unreal Engine 4

#Quixel Megascans Bridge API ####Updated: Aug 19th, 2016

We have developed an API to fetch information from the Bridge. The following is an initial list of endpoints any software will be able to retrieve information from.

  • Megascans repository path
  • Zip folder paths
  • Get all assets (folder and json path)
  • Get selected assets (folder and json path)
  • Search results (folder and json path) against a string
@Wol
Wol / twitter.php
Last active August 16, 2016 22:55
Twitter Analytics PHP Downloader
<?php
$sTarget = "https://analytics.twitter.com/user/$username/tweets/export.json?start_time=$start_time&end_time=$end_time&lang=en";
$sTargetBundle = "https://analytics.twitter.com/user/$username/tweets/bundle?start_time=$start_time&end_time=$end_time&lang=en";
curl_setopt($ch, CURLOPT_URL, $sTarget);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_HEADER, false);

Instagram photos by username for dashing

I struggled a while to create a dashing widget that would display images posted by a specific user. I build this upon the great foundation by @mjamieson that can be found here. To run this you will need a Dashing dashboard, the official Instagram ruby gem and access to the Instagram Developer API.

Getting set up

You will need to put some files into the right place in order to make this work:

  • instagram.rb goes into the /jobs/ subfolder of your dashing installation
@neutrino84
neutrino84 / PlanetShader.frag
Last active June 17, 2022 20:45
GLSL Planet Shader
precision lowp float;
uniform sampler2D channel0;
uniform float time;
varying vec2 vTextureCoord;
// rendering params
const float sphsize = 0.8; // planet size
const float dist = 0.08; // distance for glow and distortion
@matt-snider
matt-snider / README.md
Last active January 17, 2019 20:02 — forked from christiangalsterer/README.md
JIRA List Current Sprint Issues Dashing Widget

Preview

Description

A Dashing widget that lists JIRA issues in the current sprint for a specific team. For example open issues, in progress issues, etc.

Dependencies

Requires the following: