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

background_vert.glsl « shaders « eevee « engines « draw « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ab5d9a7ebe41392cc573dc3da3defe8b9872b7e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

#pragma BLENDER_REQUIRE(common_view_lib.glsl)
#pragma BLENDER_REQUIRE(surface_lib.glsl)

in vec2 pos;

RESOURCE_ID_VARYING

void main()
{
  GPU_INTEL_VERTEX_SHADER_WORKAROUND

  PASS_RESOURCE_ID

  gl_Position = vec4(pos, 1.0, 1.0);
  viewPosition = vec3(pos, -1.0);

#ifndef VOLUMETRICS
  /* Not used in practice but needed to avoid compilation errors. */
  worldPosition = viewPosition;
  worldNormal = viewNormal = normalize(-viewPosition);
#endif

#ifdef USE_ATTR
  pass_attr(viewPosition, NormalMatrix, ModelMatrixInverse);
#endif
}