implement material roughness
This commit is contained in:
parent
1e79613f2b
commit
401f9dbe34
12 changed files with 73 additions and 60 deletions
|
@ -12,12 +12,11 @@ in vec3 vertex;
|
|||
in vec3 normal;
|
||||
in vec2 tex_coord;
|
||||
in vec4 light_color;
|
||||
in float brightness;
|
||||
in float shine;
|
||||
|
||||
uniform vec3 cam_pos;
|
||||
uniform sampler2D tex;
|
||||
uniform vec3 specular;
|
||||
uniform float shine;
|
||||
uniform float max_vert_dist;
|
||||
uniform float max_cam_dist;
|
||||
uniform float light_factor;
|
||||
|
|
|
@ -7,7 +7,7 @@ out vec3 vertex;
|
|||
out vec3 normal;
|
||||
out vec2 tex_coord;
|
||||
out vec4 light_color;
|
||||
out float brightness;
|
||||
out float shine;
|
||||
|
||||
uniform mat4 model;
|
||||
uniform mat4 view;
|
||||
|
@ -21,7 +21,7 @@ void main() {
|
|||
vec3 nvertex = vec3(model * vec4(pos, 1.0));
|
||||
vertex = vec3(float(chunk_x) + pos.x, float(chunk_y) + pos.y, float(chunk_z) + pos.z);
|
||||
normal = mat3(transpose(inverse(model))) * norm.rgb;
|
||||
brightness = norm.a;
|
||||
shine = norm.a * 32.0;
|
||||
tex_coord = coord;
|
||||
light_color = light;
|
||||
gl_Position = projection * view * vec4(offset + nvertex, 1.0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue