Skip to content

Instantly share code, notes, and snippets.

@Shell64
Shell64 / gist:a430485c5a380613a75c
Created October 18, 2015 14:22
Fresnel for reflections
F = F0 + (max(vec3(1.0 - alpha), F0) - F0) * pow((1.0 - clamp(dot(ViewDirection, Half), 0.0, 1.0)), 5);
@Shell64
Shell64 / TableToXML.lua
Created October 14, 2015 22:10
Convert Lua Table to XML
--(c)2015 Leandro T. Fonseca
local Str = ""
local function TableToXML_(Tab, Key2, Depth, Attributes2)
for Key, Value in Pairs(Tab) do
if Type(Key) == "string" and Type(Value) == "table" then
if Key ~= "_attr" then
if Value[1] then
local Attributes = ""