diff options
| author | yum <yum.food.vr@gmail.com> | 2025-02-11 16:54:10 -0800 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2025-02-11 16:54:10 -0800 |
| commit | 20c32dcb055058b770062b7e9dd07f79d33a8caa (patch) | |
| tree | a712206014334ab41a012c2cc27086c5f0591c45 /math.cginc | |
| parent | 2dcf39113fab3aac8fe280f3b0ead9cf87fa958d (diff) | |
Add code
Implement basic diffuse and specular BRDF based heavily on silent's
filamented shader.
Diffstat (limited to 'math.cginc')
| -rw-r--r-- | math.cginc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/math.cginc b/math.cginc new file mode 100644 index 0000000..a12040a --- /dev/null +++ b/math.cginc @@ -0,0 +1,15 @@ +#ifndef __MATH_INC
+#define __MATH_INC
+
+#define PI 3.14159265358979323846264
+#define TAU (2 * PI)
+
+float pow5(float x)
+{
+ float tmp = x * x;
+ return (tmp * tmp) * x;
+}
+
+#endif // __MATH_INC
+
+
|
