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

eevee_surface_world_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: 09be75ecba9163770337608e5509e7a7b41ce30d (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

#pragma BLENDER_REQUIRE(common_view_lib.glsl)
#pragma BLENDER_REQUIRE(eevee_bsdf_stubs_lib.glsl)
#pragma BLENDER_REQUIRE(eevee_nodetree_eval_lib.glsl)
#pragma BLENDER_REQUIRE(eevee_surface_lib.glsl)

/* TODO(fclem) remove use of macro. use interface block instead. */
RESOURCE_ID_VARYING

void main(void)
{
  /* Fullscreen triangle. */
  int v = gl_VertexID % 3;
  float x = float((v & 1) << 2) - 1.0;
  float y = float((v & 2) << 1) - 1.0;
  gl_Position = vec4(x, y, 1.0, 1.0);

  /* Pass view position to keep accuracy. */
  interp.P = project_point(ProjectionMatrixInverse, gl_Position.xyz);
  interp.N = vec3(1);

  /* Used to pass the correct model matrix. */
  PASS_RESOURCE_ID
}