Files
Larry Gritz 04d331e439 Transitioning repository to ASWF (#1329)
* Rename CLA files so they no longer say "draft."

* Change CONTRIBUTING.mv to correctly describe the new CLA process,
  remove language related to the old SPI CLAs. Also some touchups to
  README.md.

* Update the project_intake.md to check of various things that we've
  completed.

* Change all references to the old imageworks GitHub URLs to the new
  ASWF ones. (This touches comments at the start of basically every file.)

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2021-01-25 09:44:09 -08:00

44 lines
2.0 KiB
Plaintext

// Copyright Contributors to the Open Shading Language project.
// SPDX-License-Identifier: BSD-3-Clause
// https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
#include "../common/shaders/pretty.h"
shader
test ()
{
{
float a = 0.1, b = 0.2, c = 0.5;
printf (" point (%g, %g, %g) = %g\n",
pretty(a), pretty(b), pretty(c), pretty(point(a,b,c)));
printf (" vector (%g, %g, %g) = %g\n",
pretty(a), pretty(b), pretty(c), pretty(vector(a,b,c)));
printf (" normal (%g, %g, %g) = %g\n",
pretty(a), pretty(b), pretty(c), pretty(normal(a,b,c)));
}
{
float a = 1, b = 1, c = 0;
printf ("\ntesting with spaces:\n");
printf (" point (\"shader\", %g, %g, %g) = %g\n",
pretty(a), pretty(b), pretty(c), pretty(point("shader",a,b,c)));
printf (" vector (\"shader\", %g, %g, %g) = %g\n",
pretty(a), pretty(b), pretty(c), pretty(vector("shader",a,b,c)));
printf (" normal (\"shader\", %g, %g, %g) = %g\n",
pretty(a), pretty(b), pretty(c), pretty(normal("shader",a,b,c)));
printf (" point (\"object\", %g, %g, %g) = %g\n",
pretty(a), pretty(b), pretty(c), pretty(point("object",a,b,c)));
printf (" vector (\"object\", %g, %g, %g) = %g\n",
pretty(a), pretty(b), pretty(c), pretty(vector("object",a,b,c)));
printf (" normal (\"object\", %g, %g, %g) = %g\n",
pretty(a), pretty(b), pretty(c), pretty(normal("object",a,b,c)));
printf (" point (\"myspace\", %g, %g, %g) = %g\n",
pretty(a), pretty(b), pretty(c), pretty(point("myspace",a,b,c)));
printf (" vector (\"myspace\", %g, %g, %g) = %g\n",
pretty(a), pretty(b), pretty(c), pretty(vector("myspace",a,b,c)));
printf (" normal (\"myspace\", %g, %g, %g) = %g\n",
pretty(a), pretty(b), pretty(c), pretty(normal("myspace",a,b,c)));
}
}