diff options
author | clayjohn <claynjohn@gmail.com> | 2018-11-03 11:35:46 -0700 |
---|---|---|
committer | clayjohn <claynjohn@gmail.com> | 2018-12-11 09:44:38 -0800 |
commit | 2042d6214e1ab302a1d9a0a4bd8a018bf6ee679b (patch) | |
tree | e61d850727008f3701d9c31238bbd0d633ce50c8 /drivers/gles3/shaders/scene.glsl | |
parent | f84893f70901dfca356d949ea1585a56154cb59f (diff) |
make VIEW vector available in fragment
Diffstat (limited to 'drivers/gles3/shaders/scene.glsl')
-rw-r--r-- | drivers/gles3/shaders/scene.glsl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl index 91ab34f775..bde6f2c92c 100644 --- a/drivers/gles3/shaders/scene.glsl +++ b/drivers/gles3/shaders/scene.glsl @@ -1571,6 +1571,7 @@ void main() { //lay out everything, whathever is unused is optimized away anyway highp vec3 vertex = vertex_interp; + vec3 view = -normalize(vertex_interp); vec3 albedo = vec3(1.0); vec3 transmission = vec3(0.0); float metallic = 0.0; @@ -1705,7 +1706,7 @@ FRAGMENT_SHADER_CODE vec3 ambient_light; vec3 env_reflection_light = vec3(0.0, 0.0, 0.0); - vec3 eye_vec = -normalize(vertex_interp); + vec3 eye_vec = view; #ifdef USE_RADIANCE_MAP |