Skip to content

Instantly share code, notes, and snippets.

View est77's full-sized avatar

Esteban Tovagliari est77

View GitHub Profile
@est77
est77 / cmake-static-link.txt
Created May 31, 2019 16:33
appleseed link static
@est77
est77 / bindmurmurhash.cpp
Created May 30, 2018 18:08
bind murmurhash test
//
// This source file is part of appleseed.
// Visit https://appleseedhq.net/ for additional information and resources.
//
// This software is released under the MIT license.
//
// Copyright (c) 2018 Esteban Tovagliari, The appleseedhq Organization
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
@est77
est77 / compressed_unit_vector.cpp
Created September 1, 2017 14:23
Compressed unit vectors
/*
Reference:
----------
A Survey of Efficient Representations for Independent Unit Vectors
*/
#include <cmath>
#include <cstdint>
#include <iostream>
@est77
est77 / build.sh
Last active March 2, 2017 15:05
build appleseed linux
export APPLESEED_DEPENDENCIES="..."
export CMAKE_INCLUDE_PATH=$APPLESEED_DEPENDENCIES/include
export CMAKE_LIBRARY_PATH=$APPLESEED_DEPENDENCIES/lib
export LD_LIBRARY_PATH=$APPLESEED_DEPENDENCIES/lib
mkdir build
cd build
cmake \
import appleseed as asr
mesh = asr.MeshObject("my_mesh", {})
print mesh
# Vertices
v0 = asr.Vector3f([0.0, 0.0, 0.0])
v1 = asr.Vector3f([1.0, 0.0, 0.0])
v2 = asr.Vector3f([0.0, 0.0, 1.0])
@est77
est77 / gafferseed_area_light.gfr
Created August 8, 2016 19:08
gafferseed area light
import Gaffer
import GafferAppleseed
import GafferDispatch
import GafferImage
import GafferOSL
import GafferScene
import IECore
Gaffer.Metadata.registerNodeValue( parent, "serialiser:milestoneVersion", 0, persistent=False )
Gaffer.Metadata.registerNodeValue( parent, "serialiser:majorVersion", 27, persistent=False )
# CMake-gui popup menu.
set (USE_SIMD "OFF" CACHE STRING "Enable SIMD")
set_property (CACHE USE_SIMD PROPERTY STRINGS OFF SSE2 SSE4.2 AVX)
// two C1
template <typename T>
inline T fresnel_first_moment(const T eta)
{
return
eta < T(1.0)
? T(0.919317) + eta * (T(-3.4793) + eta * (T(6.75335) + eta * (T(-7.80989) + eta * (T(4.98554) - eta * T(1.36881)))))
: T(-9.23372) + eta * (T(22.2272) + eta * (T(-20.9292) + eta * (T(10.2291) + eta * (T(-2.54396) + eta * T(0.254913)))));
}
0.0538163,
0.0590581,
0.0628132,
0.0659693,
0.0687794,
0.0713581,
0.0737684,
0.0760496,
0.0782278,
0.0803216,
0.01 0.2001
0.20202 1.3001
0.40404 2.1001
0.606061 2.8001
0.808081 3.3001
1.0101 3.8001
1.21212 4.3001
1.41414 4.7001
1.61616 5.1001
1.81818 5.4001