From f6de2b1453930267015ab9323d5f83daa25667ba Mon Sep 17 00:00:00 2001 From: Charles Date: Thu, 14 May 2020 19:09:39 +0200 Subject: Added ugly Cylindric UV mapping, texture/color transition --- shader/fragment.glsl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'shader/fragment.glsl') diff --git a/shader/fragment.glsl b/shader/fragment.glsl index 4ada539..710cfbe 100644 --- a/shader/fragment.glsl +++ b/shader/fragment.glsl @@ -6,8 +6,10 @@ in vec2 v_texture_coord; out vec4 out_color; uniform sampler2D u_texture; +uniform float u_color_ratio; void main() { - out_color = texture(u_texture, v_texture_coord); + out_color = v_color * u_color_ratio + + texture(u_texture, v_texture_coord) * (1.0 - u_color_ratio); } -- cgit