mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-09 21:31:51 +09:00
fixture ghost is now red when it cant be placed there
This commit is contained in:
@@ -3,6 +3,8 @@ in vec4 v_color;
|
||||
in vec2 v_texCoords;
|
||||
uniform sampler2D u_texture;
|
||||
|
||||
uniform vec4 ghostColour = vec4(1.0);
|
||||
|
||||
const vec2 boolean = vec2(0.0, 1.0);
|
||||
const vec4 desaturate = vec4(0.2126, 0.7152, 0.0722, 0.0);
|
||||
out vec4 fragColor;
|
||||
@@ -11,6 +13,5 @@ void main(void) {
|
||||
vec4 incolour = texture(u_texture, v_texCoords);
|
||||
float lum = dot(incolour * desaturate, boolean.yyyx) * 0.5 + 0.5;
|
||||
|
||||
// fragColor = v_color * (vec4(lum) * boolean.yyyx + incolour * boolean.xxxy);
|
||||
fragColor = v_color * fma(vec4(lum), boolean.yyyx, incolour * boolean.xxxy);
|
||||
fragColor = ghostColour * fma(vec4(lum), boolean.yyyx, incolour * boolean.xxxy);
|
||||
}
|
||||
Reference in New Issue
Block a user