OSDN Git Service

three.jsをThirdPartyに追加
[webglgame/webgl_framework.git] / webglFramework / Thirdparty / three.js-master / src / renderers / shaders / ShaderChunk / clipping_planes_fragment.glsl
1 #if NUM_CLIPPING_PLANES > 0
2
3         for ( int i = 0; i < UNION_CLIPPING_PLANES; ++ i ) {
4
5                 vec4 plane = clippingPlanes[ i ];
6                 if ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;
7
8         }
9                 
10         #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES
11
12                 bool clipped = true;
13                 for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; ++ i ) {
14                         vec4 plane = clippingPlanes[ i ];
15                         clipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;
16                 }
17
18                 if ( clipped ) discard;
19         
20         #endif
21
22 #endif