Rename model_col -> highligh_col to better reflect its usage

This commit is contained in:
Imbris 2020-10-05 05:04:22 -04:00
parent fb2cf1a292
commit a3ee5a4006
5 changed files with 8 additions and 8 deletions

View File

@ -48,7 +48,7 @@ uniform sampler2D t_col_light;
layout (std140)
uniform u_locals {
mat4 model_mat;
vec4 model_col;
vec4 highlight_col;
ivec4 atlas_offs;
vec3 model_pos;
// bit 0 - is player
@ -195,8 +195,8 @@ void main() {
// light += point_light;
// diffuse_light += point_light;
// reflected_light += point_light;
// vec3 surf_color = illuminate(srgb_to_linear(model_col.rgb * f_col), light, diffuse_light, ambient_light);
surf_color = illuminate(max_light, view_dir, surf_color * emitted_light, surf_color * reflected_light) * model_col.rgb;
// vec3 surf_color = illuminate(srgb_to_linear(highlight_col.rgb * f_col), light, diffuse_light, ambient_light);
surf_color = illuminate(max_light, view_dir, surf_color * emitted_light, surf_color * reflected_light) * highlight_col.rgb;
#if (CLOUD_MODE == CLOUD_MODE_REGULAR)
float fog_level = fog(f_pos.xyz, focus_pos.xyz, medium.x);

View File

@ -26,7 +26,7 @@ in uint v_ao_bone; */
layout (std140)
uniform u_locals {
mat4 model_mat;
vec4 model_col;
vec4 highlight_col;
ivec4 atlas_offs;
vec3 model_pos;
// bit 0 - is player

View File

@ -38,7 +38,7 @@ in uint v_atlas_pos;
layout (std140)
uniform u_locals {
mat4 model_mat;
vec4 model_col;
vec4 highlight_col;
ivec4 atlas_offs;
vec3 model_pos;
// bit 0 - is player

View File

@ -24,7 +24,7 @@ in float f_ao;
layout (std140)
uniform u_locals {
mat4 model_mat;
vec4 model_col;
vec4 highlight_col;
ivec4 atlas_offs;
vec3 model_pos;
int flags;

View File

@ -12,7 +12,7 @@ use vek::*;
gfx_defines! {
constant Locals {
model_mat: [[f32; 4]; 4] = "model_mat",
model_col: [f32; 4] = "model_col",
highlight_col: [f32; 4] = "highlight_col",
atlas_offs: [i32; 4] = "atlas_offs",
model_pos: [f32; 3] = "model_pos",
flags: u32 = "flags",
@ -64,7 +64,7 @@ impl Locals {
Self {
model_mat: model_mat.into_col_arrays(),
model_col: col.into_array(),
highlight_col: col.into_array(),
model_pos: pos.into_array(),
atlas_offs: Vec4::from(atlas_offs).into_array(),
flags,