diff options
author | Thomas Dinges <blender@dingto.org> | 2012-06-06 20:00:21 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2012-06-06 20:00:21 +0400 |
commit | 47c96b6e402f23afeb2ee577745b1e9f0e1ae085 (patch) | |
tree | ccd806950b9726fe888959d95f1aba9a32bde05e /intern | |
parent | 1931aac1f760500446aa5084a50f94b3f3ad8727 (diff) |
Cycles / OSL:
* Fixes for some silly typos in the checker shader.
* Added missing GPL licence block to node_fresnel.h.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/kernel/osl/nodes/node_checker_texture.osl | 12 | ||||
-rw-r--r-- | intern/cycles/kernel/osl/nodes/node_fresnel.h | 17 |
2 files changed, 22 insertions, 7 deletions
diff --git a/intern/cycles/kernel/osl/nodes/node_checker_texture.osl b/intern/cycles/kernel/osl/nodes/node_checker_texture.osl index a80242ad36a..306798b645f 100644 --- a/intern/cycles/kernel/osl/nodes/node_checker_texture.osl +++ b/intern/cycles/kernel/osl/nodes/node_checker_texture.osl @@ -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; diff --git a/intern/cycles/kernel/osl/nodes/node_fresnel.h b/intern/cycles/kernel/osl/nodes/node_fresnel.h index 0368c1910aa..de5d29a3c18 100644 --- a/intern/cycles/kernel/osl/nodes/node_fresnel.h +++ b/intern/cycles/kernel/osl/nodes/node_fresnel.h @@ -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 |