R2 Shaders
R2CubeMaps.h
Go to the documentation of this file.
1 #ifndef R2_CUBE_MAPS_H
2 #define R2_CUBE_MAPS_H
3 
4 /// \file R2CubeMaps.h
5 /// \brief Functions for dealing with cube maps.
6 
7 ///
8 /// Sample from a right-handed cube map \a t using the world-space vector \a v.
9 ///
10 /// @param t A right-handed cube map
11 /// @param v A world-space direction vector
12 ///
13 
14 vec4
16  const samplerCube t,
17  const vec3 v)
18 {
19  return textureCube (t, vec3 (
20  v.x,
21  0.0 - v.y,
22  0.0 - v.z
23  ));
24 }
25 
26 #endif // R2_CUBE_MAPS_H
vec4 R2_cubeMapTextureRH(const samplerCube t, const vec3 v)
Definition: R2CubeMaps.h:15