@ -601,7 +602,7 @@ Specular lighting describes the highlights that appear on objects when viewed fr
![./specular_diagram.png](./specular_diagram.png)
Because this is relative to the view angle, we are going to need to pass in the camera's position into the fragment shader.
Because this is relative to the view angle, we are going to need to pass in the camera's position both into the fragment shader and into the vertex shader.
```glsl
// shader.frag
@ -612,6 +613,16 @@ uniform Uniforms {
};
```
```glsl
// shader.vert & light.vert
layout(set=1, binding=0)
uniform Uniforms {
vec3 u_view_position; // unused
mat4 u_view_proj;
};
```
We're going to need to update the `Uniforms` struct as well.
```rust
@ -706,4 +717,4 @@ It's hard to tell the difference, but here's the results.