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

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

out vec4 fragColor;

layout(location = 0) out vec4 materialData;
layout(location = 1) out vec4 normalData;
layout(location = 2) out uint objectId;

void main()
{
  const float a = 0.25;
#ifdef SHADOW_PASS
  materialData.rgb = gl_FrontFacing ? vec3(a, -a, 0.0) : vec3(-a, a, 0.0);
#else
  materialData.rgb = gl_FrontFacing ? vec3(a, a, -a) : vec3(-a, -a, a);
#endif
  materialData.a = 0.0;
  normalData = vec4(0.0);
  objectId = 0u;
}