From a3ee5a4006aa3f7f6516e106b4bc3b434a1abbdf Mon Sep 17 00:00:00 2001 From: Imbris Date: Mon, 5 Oct 2020 05:04:22 -0400 Subject: [PATCH] Rename model_col -> highligh_col to better reflect its usage --- assets/voxygen/shaders/figure-frag.glsl | 6 +++--- assets/voxygen/shaders/figure-vert.glsl | 2 +- assets/voxygen/shaders/light-shadows-figure-vert.glsl | 2 +- assets/voxygen/shaders/player-shadow-frag.glsl | 2 +- voxygen/src/render/pipelines/figure.rs | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/assets/voxygen/shaders/figure-frag.glsl b/assets/voxygen/shaders/figure-frag.glsl index 6a8015773d..813aebe54a 100644 --- a/assets/voxygen/shaders/figure-frag.glsl +++ b/assets/voxygen/shaders/figure-frag.glsl @@ -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); diff --git a/assets/voxygen/shaders/figure-vert.glsl b/assets/voxygen/shaders/figure-vert.glsl index cb4f4414b0..c44315989f 100644 --- a/assets/voxygen/shaders/figure-vert.glsl +++ b/assets/voxygen/shaders/figure-vert.glsl @@ -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 diff --git a/assets/voxygen/shaders/light-shadows-figure-vert.glsl b/assets/voxygen/shaders/light-shadows-figure-vert.glsl index b7d9d1a21f..852e0a23f9 100644 --- a/assets/voxygen/shaders/light-shadows-figure-vert.glsl +++ b/assets/voxygen/shaders/light-shadows-figure-vert.glsl @@ -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 diff --git a/assets/voxygen/shaders/player-shadow-frag.glsl b/assets/voxygen/shaders/player-shadow-frag.glsl index 693bc30409..69115d7323 100644 --- a/assets/voxygen/shaders/player-shadow-frag.glsl +++ b/assets/voxygen/shaders/player-shadow-frag.glsl @@ -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; diff --git a/voxygen/src/render/pipelines/figure.rs b/voxygen/src/render/pipelines/figure.rs index f4de569913..74bb1b7a79 100644 --- a/voxygen/src/render/pipelines/figure.rs +++ b/voxygen/src/render/pipelines/figure.rs @@ -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,