
Reflect I about N
I - 2*(I.N)*N

Project d onto the plane that N is normal to
d - (N.d) * N
Maybe the most boring blog ever... but it's *my* most boring blog ever.
nm -A -C dof.so | grep globalThreadCount
This is useful to track the source of an error message related to a mangled sym table name,
eg.
D02001 {WARNING} TgPathDLOpen: Bad DSO found: dof.so (undefined symbol: _ZN3Imf17globalThreadCountEv)
man nm
will give the manual page
ldd mydso.so
will list the dependencies a dso has. Which is also useful
collection void RIB {
state closed
ribattribute string "shade:transmissionhitmode" {
label "shadeTransmissionHitMode"
default "primitive"
subtype selector
range { "primitive" "primitive"
"shader" "shader"
}
}
}
Breifly (see diagram also):
float S = 1;
point P = transform("world", P);
point E = transform("world", E);
vector I = vtransform("world", I);
if ( ycomp(I) < 0 ) // I.e. point being shaded is closer to ground than the camera
{
// S is some scale value we need to solve to scale I upto;
// I' = P'-E
// ycomp(P') we know is always zero
// therefore we can solve the scale for ycomp and use it to scale I (similar triangles)
// P' = E + I*S;
// so;
// ycomp(E) + ( ycomp(I) * S ) = 0;
S = ( -ycomp(E) / ycomp(I) );
I = vtransform("world", "current", I*S);
// Voila, our new fake (clamped) depth is;
depth = min( length(I), 65535 );
}
else
{
// E.g. plane is upside down, etc.
// Just Set depth to Max ( 65535, which is the largest value our EXR's can store )
depth = 65535;
}
Attribute "grouping" "string membership" ["noRflOccl"]
string $ws = `workspace -q -rd`;
     vector refract( vector I, N; float eta )
     vector faceforward( vector N, I )
     type clamp( type a, min, max )
     type mix( type x, y; float alpha )
     type smoothstep( type min, max, value )