Skip to content

Instantly share code, notes, and snippets.

View trentpolack's full-sized avatar

Trent Polack trentpolack

View GitHub Profile
@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);

#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

#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
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
@dmnsgn
dmnsgn / WebGL-WebGPU-frameworks-libraries.md
Last active May 18, 2025 14:06
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
@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.

@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:

#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

#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
@trentpolack
trentpolack / InitializerSharedPtr.cpp
Last active November 11, 2017 07:55
Construction/Allocation-Time std::shared_ptr Initialization (for the case where your class doesn't have constructors with an empty argument list)
class InitializerSharedPtr
{
protected:
struct PrivateStruct
{
explicit PrivateStruct( int Irrelevant )
{ }
};
public: