Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gpencil_depth_merge_frag.glsl « shaders « gpencil « engines « draw « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 71597197bd8407c8312845f50ee437494d1942ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

uniform sampler2D depthBuf;
uniform float strokeDepth2d;
uniform bool strokeOrder3d;

noperspective in vec4 uvcoordsvar;

void main()
{
  float depth = textureLod(depthBuf, uvcoordsvar.xy, 0).r;
  if (strokeOrder3d) {
    gl_FragDepth = depth;
  }
  else {
    gl_FragDepth = (depth != 0.0) ? gl_FragCoord.z : 1.0;
  }
}