Yet another iteration by Jagger with non diffuse and non specular component of my IBL modification for Joe Alter's Shave and & Haircut
--- shader1.sl 2008-04-02 14:50:24.000000000 +0900
+++ shader2.sl 2008-04-02 20:07:42.000000000 +0900
@@ -24,13 +24,16 @@
float vt;
float tl;
float nondiff = 0;
+float nonspec = 0;
lightsource("__nondiffuse", nondiff);
-illuminance ("environment", P, Ns, 1.57,
+lightsource("__nonspecular", nonspec);
+illuminance ("environment", P, Ns, PI,
"lightcache", "refresh",
"send:light:__surfacearea", -10,
-"send:light:__coneangle", 1.57,
+"send:light:__coneangle", PI,
"send:light:__coneaxis", Ns,
"light:__nondiffuse", nondiff,
+"light:__nonspecular", nonspec,
"light:_indirectdiffuse", indiff,
"light:_occlusion", occl){
float sq2;
@@ -49,15 +52,19 @@
sq2=sqrt(sq2);
rawspec = df2* sqrt( 1.0- vt * vt ) - (normalize(L). T ) * vt; /* raw specular */
if (rawspec<0) rawspec="0;" diffterm="(1.0-SHAVEambdiff)+diffterm*SHAVEambdiff;" cl2="Cl*SHAVEselfshad+(1-SHAVEselfshad);" nondiff =" 0;" nonspec =" 0;" df2="(T.normalize(L));" rawspec="0;" diffterm="(1.0-SHAVEambdiff)+diffterm*SHAVEambdiff;" cl2="Cl*SHAVEselfshad+(1-SHAVEselfshad);" mixed =" mix(" oi =" Os*SHAVEopacity;
Post a Comment