summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-08-31 01:34:03 +0200
committerMichael Bien <[email protected]>2010-08-31 01:34:03 +0200
commit06e0c480e4379ebee77675f1fd55eb71e5c68247 (patch)
tree557a4e78cdadf1f68d03371c7423308c57c7f4bd
parentf6f2d22005327c6da3bbb67eb96b56ba96212aff (diff)
parentca34c83b7ca95bb5beadc8f2350db4585d7c8f9a (diff)
Merge branch 'master' of github.com:mbien/jocl-demos
-rw-r--r--src/com/jogamp/opencl/demos/julia3d/mandelbrot_kernel.cl8
-rw-r--r--src/com/jogamp/opencl/demos/julia3d/rendering_kernel.cl12
2 files changed, 10 insertions, 10 deletions
diff --git a/src/com/jogamp/opencl/demos/julia3d/mandelbrot_kernel.cl b/src/com/jogamp/opencl/demos/julia3d/mandelbrot_kernel.cl
index d5acd02..ffbbbca 100644
--- a/src/com/jogamp/opencl/demos/julia3d/mandelbrot_kernel.cl
+++ b/src/com/jogamp/opencl/demos/julia3d/mandelbrot_kernel.cl
@@ -52,7 +52,7 @@ typedef struct {
// Scalar derivative approach by Enforcer:
// http://www.fractalforums.com/mandelbulb-implementation/realtime-renderingoptimisations/
-static float IterateIntersect(const float4 z0, const float4 c0, const uint maxIterations) {
+float IterateIntersect(const float4 z0, const float4 c0, const uint maxIterations) {
float4 z = z0;
float4 c = c0;
@@ -80,7 +80,7 @@ static float IterateIntersect(const float4 z0, const float4 c0, const uint maxIt
return 0.5f * log(r) * r / dr;
}
-static float IntersectBulb(const float4 eyeRayOrig, const float4 eyeRayDir,
+float IntersectBulb(const float4 eyeRayOrig, const float4 eyeRayDir,
const float4 c, const uint maxIterations, const float epsilon,
const float maxDist, float4 *hitPoint, uint *steps) {
float dist;
@@ -154,7 +154,7 @@ int IntersectBoundingSphere(const float4 eyeRayOrig, const float4 eyeRayDir,
}
}
-static float4 NormEstimate(const float4 p, const float4 c,
+float4 NormEstimate(const float4 p, const float4 c,
const float delta, const uint maxIterations) {
const float4 qP = p;
const float4 gx1 = qP - (float4)(delta, 0.f, 0.f, 0.f);
@@ -176,7 +176,7 @@ static float4 NormEstimate(const float4 p, const float4 c,
return N;
}
-static float4 Phong(const float4 light, const float4 eye, const float4 pt,
+float4 Phong(const float4 light, const float4 eye, const float4 pt,
const float4 N, const float4 diffuse) {
const float4 ambient = (float4) (0.05f, 0.05f, 0.05f, 0.f);
float4 L = normalize(light - pt);
diff --git a/src/com/jogamp/opencl/demos/julia3d/rendering_kernel.cl b/src/com/jogamp/opencl/demos/julia3d/rendering_kernel.cl
index 9c25c1b..5082c51 100644
--- a/src/com/jogamp/opencl/demos/julia3d/rendering_kernel.cl
+++ b/src/com/jogamp/opencl/demos/julia3d/rendering_kernel.cl
@@ -51,7 +51,7 @@ typedef struct {
} RenderingConfig;
-static float4 QuatMult(const float4 q1, const float4 q2) {
+float4 QuatMult(const float4 q1, const float4 q2) {
float4 r;
// a1a2 - b1b2 - c1c2 - d1d2
@@ -66,7 +66,7 @@ static float4 QuatMult(const float4 q1, const float4 q2) {
return r;
}
-static float4 QuatSqr(const float4 q) {
+float4 QuatSqr(const float4 q) {
float4 r;
r.x = q.x * q.x - q.y * q.y - q.z * q.z - q.w * q.w;
@@ -77,7 +77,7 @@ static float4 QuatSqr(const float4 q) {
return r;
}
-static void IterateIntersect(float4 *q, float4 *qp, const float4 c, const uint maxIterations) {
+void IterateIntersect(float4 *q, float4 *qp, const float4 c, const uint maxIterations) {
float4 q0 = *q;
float4 qp0 = *qp;
@@ -93,7 +93,7 @@ static void IterateIntersect(float4 *q, float4 *qp, const float4 c, const uint m
*qp = qp0;
}
-static float IntersectJulia(const float4 eyeRayOrig, const float4 eyeRayDir,
+float IntersectJulia(const float4 eyeRayOrig, const float4 eyeRayDir,
const float4 c, const uint maxIterations, const float epsilon,
float4 *hitPoint, uint *steps) {
float dist;
@@ -170,7 +170,7 @@ float IntersectBoundingSphere(const float4 eyeRayOrig, const float4 eyeRayDir) {
}
}
-static float4 NormEstimate(const float4 p, const float4 c,
+float4 NormEstimate(const float4 p, const float4 c,
const float delta, const uint maxIterations) {
float4 N;
float4 qP = p;
@@ -201,7 +201,7 @@ static float4 NormEstimate(const float4 p, const float4 c,
return N;
}
-static float4 Phong(const float4 light, const float4 eye, const float4 pt, const float4 N, const float4 diffuse) {
+float4 Phong(const float4 light, const float4 eye, const float4 pt, const float4 N, const float4 diffuse) {
const float4 ambient = (float4) (0.05f, 0.05f, 0.05f, 0.f);
float4 L = normalize(light - pt);