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

depth_2d_update_int24_frag.glsl « kernels « metal « gpu « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7483343503f6f84232c54d1f4d20f1377d1adbe0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13

uniform isampler2D source_data;
uniform int mip;

in vec2 texCoord_interp;

void main()
{
  uint val = textureLod(source_data, texCoord_interp, mip).r;
  uint stencil = (val >> 24) & 0xFFu;
  uint depth = (val)&0xFFFFFFu;
  gl_FragDepth = float(depth) / float(0xFFFFFFu);
}