Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
Transparency Shader API

To properly handle transparency, your fragment shader should contains the following function calls: More...

Functions

bool OivDepthPeel (vec3 fragmentCoords)
 This method peels the current fragment.
 

Detailed Description

To properly handle transparency, your fragment shader should contains the following function calls:

These methods are accessible by including the <Inventor/oivDepthPeeling_frag.h> header in your shader: Ex:

void main()
{
if ( OivDepthPeel(gl_FragCoord.xyz) )
{
Vec4 color = vec4(1, 0, 0, 0.5);
OivDepthPeelingOutputColor(color);
}
}
bool OivDepthPeel(vec3 fragmentCoords)
This method peels the current fragment.

Function Documentation

◆ OivDepthPeel()

bool OivDepthPeel ( vec3  fragmentCoords)

This method peels the current fragment.

If the fragment must be ignored, this method does the discard. The fragment coords must be in screen space (gl_FragCoord.xyz should always be used)

Returns true if the fragment should be shaded.