mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
19 lines
515 B
GLSL
19 lines
515 B
GLSL
|
|
uniform int u_clipPlaneCount;
|
|
|
|
varying float v_clipDist[6];
|
|
|
|
#define CVF_CHECK_DISCARD_FRAGMENT_IMPL
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
/// Check if fragment should be discarded based on clip distances and discard if needed
|
|
//--------------------------------------------------------------------------------------------------
|
|
void checkDiscardFragment()
|
|
{
|
|
int i;
|
|
for (i = 0; i < u_clipPlaneCount; i++)
|
|
{
|
|
if (v_clipDist[i] < 0.0) discard;
|
|
}
|
|
}
|