Skip to content

Instantly share code, notes, and snippets.

View linniksergey's full-sized avatar

zloi linniksergey

  • Herceg Novi, Montenegro
View GitHub Profile
# select all nodes
nodes = comp.GetToolList().values() #[]
# select all selected nodes
selected_nodes = comp.GetToolList(True).values() #[]
# select selected savers
selected_savers = comp.GetToolList(True, "Saver").values() #[]
# select all savers
@linniksergey
linniksergey / firefly2.nk
Created December 26, 2015 20:19
firefly remover variant2
set cut_paste_input [stack 0]
version 9.0 v8
push $cut_paste_input
Noise {
lacunarity 4.75
gain 1
gamma 0
center {1024 778}
name Noise1
selected true
#include "math.h"
vector Schlick(float CosT; vector FZero)
{
return (FZero + (1-FZero) * pow(1-CosT, 5));
}
void myCookTorrance(vector nN, FZero, specular; float roughness; string categories, lightmask)
{
#include "math.h"
void myDiffuse(vector color, nN, diffuseNoShadowPass, diffusePass, shadowPass; string categories, lightmask)
{
diffuseNoShadowPass = {0, 0, 0};
diffusePass = {0, 0, 0};
shadowPass = {0, 0, 0};
illuminance(P, nN, M_PI/2, bouncemask("diffuse"), "categories", categories, "lightmask", lightmask)
{
#include "math.h"
vector Schlick (float cosT; vector Fi)
{
return (Fi + (1-Fi) * pow(1-cosT, 5));
}
vector cookTorrance(vector nN; string category; vector Fi; float roughness)
{
vector out = {0,0,0};