Image Engine: Remove unused shader parameter Color.
This change removes an unused shader parameter that also collided when a local varialble with the same name was used on different platforms.
This commit is contained in:
parent
75e61e5a6d
commit
3b2a1ff716
|
@ -94,7 +94,6 @@ template<typename TextureMethod> class ScreenSpaceDrawingMode : public AbstractD
|
|||
|
||||
DRWShadingGroup *shgrp = DRW_shgroup_create(shader, instance_data->passes.image_pass);
|
||||
DRW_shgroup_uniform_vec2_copy(shgrp, "farNearDistances", sh_params.far_near);
|
||||
DRW_shgroup_uniform_vec4_copy(shgrp, "col", ShaderParameters::color);
|
||||
DRW_shgroup_uniform_vec4_copy(shgrp, "shuffle", sh_params.shuffle);
|
||||
DRW_shgroup_uniform_int_copy(shgrp, "drawFlags", sh_params.flags);
|
||||
DRW_shgroup_uniform_bool_copy(shgrp, "imgPremultiplied", sh_params.use_premul_alpha);
|
||||
|
|
|
@ -35,8 +35,6 @@
|
|||
#include "image_space.hh"
|
||||
|
||||
struct ShaderParameters {
|
||||
constexpr static float color[4] = {1.0f, 1.0f, 1.0f, 1.0f};
|
||||
|
||||
int flags = 0;
|
||||
float shuffle[4];
|
||||
float far_near[2];
|
||||
|
|
|
@ -34,7 +34,7 @@ void main()
|
|||
}
|
||||
|
||||
if ((drawFlags & IMAGE_DRAW_FLAG_SHUFFLING) != 0) {
|
||||
tex_color = col * dot(tex_color, shuffle);
|
||||
tex_color = vec4(dot(tex_color, shuffle));
|
||||
}
|
||||
if ((drawFlags & IMAGE_DRAW_FLAG_SHOW_ALPHA) == 0) {
|
||||
tex_color.a = 1.0;
|
||||
|
|
|
@ -10,7 +10,6 @@ GPU_SHADER_CREATE_INFO(image_engine_shader)
|
|||
.vertex_out(image_engine_iface)
|
||||
.fragment_out(0, Type::VEC4, "fragColor")
|
||||
.push_constant(Type::VEC4, "shuffle")
|
||||
.push_constant(Type::VEC4, "col")
|
||||
.push_constant(Type::VEC2, "maxUv")
|
||||
.push_constant(Type::VEC2, "farNearDistances")
|
||||
.push_constant(Type::INT, "drawFlags")
|
||||
|
@ -19,4 +18,4 @@ GPU_SHADER_CREATE_INFO(image_engine_shader)
|
|||
.vertex_source("image_engine_vert.glsl")
|
||||
.fragment_source("image_engine_frag.glsl")
|
||||
.additional_info("draw_modelmat")
|
||||
.do_static_compilation(true);
|
||||
.do_static_compilation(true);
|
||||
|
|
Loading…
Reference in New Issue