Cycles / OSL:

* Fixes for some silly typos in the checker shader.
* Added missing GPL licence block to node_fresnel.h.
This commit is contained in:
Thomas Dinges 2012-06-06 16:00:21 +00:00
parent 1931aac1f7
commit 47c96b6e40
2 changed files with 22 additions and 7 deletions

@ -23,13 +23,13 @@
float checker(point p)
{
p[0] = (p[0] + 0.00001)*0.9999);
p[1] = (p[1] + 0.00001)*0.9999);
p[2] = (p[2] + 0.00001)*0.9999);
p[0] = (p[0] + 0.00001)*0.9999;
p[1] = (p[1] + 0.00001)*0.9999;
p[2] = (p[2] + 0.00001)*0.9999;
int xi = fabs(floor(p[0]));
int yi = fabs(floor(p[1]));
int zi = fabs(floor(p[2]));
int xi = (int)fabs(floor(p[0]));
int yi = (int)fabs(floor(p[1]));
int zi = (int)fabs(floor(p[2]));
if((xi % 2 == yi % 2) == (zi % 2)) {
return 1.0;

@ -1,4 +1,19 @@
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
float fresnel_dielectric(vector Incoming, normal Normal, float eta)
{
/* compute fresnel reflectance without explicitly computing