OSDN Git Service

copy from jme10694
authorkobayasi <kobayasi@pscnet.co.jp>
Sat, 6 Jul 2013 21:34:45 +0000 (06:34 +0900)
committerkobayasi <kobayasi@pscnet.co.jp>
Sat, 6 Jul 2013 21:34:45 +0000 (06:34 +0900)
engine/src/core-data/Common/ShaderLib/WaterUtil.glsllib [new file with mode: 0644]

diff --git a/engine/src/core-data/Common/ShaderLib/WaterUtil.glsllib b/engine/src/core-data/Common/ShaderLib/WaterUtil.glsllib
new file mode 100644 (file)
index 0000000..51c4d8a
--- /dev/null
@@ -0,0 +1,10 @@
+#ifdef ENABLE_AREA        \r
+bool isOverExtent(vec3 position,vec3 center,float radius){\r
+        vec2 dist = position.xz-center.xz;\r
+        #ifdef SQUARE_AREA \r
+                return dist.x*dist.x >radius || dist.y*dist.y >radius;\r
+        #else\r
+                return dot(dist,dist)>radius;\r
+        #endif\r
+}\r
+#endif
\ No newline at end of file