1 #ifndef R2_ENVIRONMENT_REFLECTION_H 2 #define R2_ENVIRONMENT_REFLECTION_H 28 const mat4x4 view_inv)
30 vec3 v_eye_n = normalize (v_eye);
31 vec3 n_eye_n = normalize (n_eye);
32 vec3 r = reflect (v_eye_n, n_eye_n);
33 vec4 r_world = view_inv * vec4 (r, 0.0);
37 #endif // R2_ENVIRONMENT_REFLECTION_H Functions for dealing with cube maps.
vec4 R2_cubeMapTextureRH(const samplerCube t, const vec3 v)
vec4 R2_environmentReflection(const samplerCube t, const vec3 v_eye, const vec3 n_eye, const mat4x4 view_inv)