Skip to content

Instantly share code, notes, and snippets.

View ccmiaomiao's full-sized avatar
💭
Unemployment

Denpa Kuro ccmiaomiao

💭
Unemployment
View GitHub Profile
@EDais
EDais / colourTemperature.js
Created August 30, 2017 14:50
JavaScript port of getRGBFromTemperature
"use strict";
const clamp = (num, min, max) => num < min ? min : num > max ? max : num;
/** Given a temperature (in Kelvin), estimate an RGB equivalent
* @param {number} tmpKelvin - Temperature (in Kelvin) between 1000 and 40000
* @returns {{r:number, g:number, b:number}} - RGB channel intensities (0-255)
* @description Ported from: http://www.tannerhelland.com/4435/convert-temperature-rgb-algorithm-code/
*/
exports.getRGBFromTemperature = function(tmpKelvin) {
@jminor
jminor / Standard-DoubleSided.shader
Created June 1, 2017 16:30
Unity Standard-DoubleSided.shader
Shader "Standard-DoubleSided"
{
Properties
{
_Color("Color", Color) = (1,1,1,1)
_MainTex("Albedo", 2D) = "white" {}
_Cutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5
_Glossiness("Smoothness", Range(0.0, 1.0)) = 0.5