File: terrain.vs

package info (click to toggle)
castle-game-engine 6.4%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 194,520 kB
  • sloc: pascal: 364,585; ansic: 8,606; java: 2,851; objc: 2,601; cpp: 1,412; xml: 851; makefile: 725; sh: 563; php: 26
file content (16 lines) | stat: -rw-r--r-- 498 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* OpenGL shader effect (used to enhance the Castle Game Engine shaders,
   see https://castle-engine.sourceforge.io/compositing_shaders.php ),
   applied over terrain.

   This simply saves position and normal in object space,
   to be used by terrain.fs code. */

varying vec3 terrain_position;
varying vec3 terrain_normal;

void PLUG_vertex_object_space(
  const in vec4 vertex_object, const in vec3 normal_object)
{
  terrain_position = vec3(vertex_object);
  terrain_normal = normal_object;
}