Bump version to 0.0.15

Add thresholded image to result of jump flood
This commit is contained in:
Edwin Jakobs
2018-12-02 19:09:35 +01:00
parent 4876e87924
commit 414a0fcc95
3 changed files with 145 additions and 144 deletions

View File

@@ -1,15 +1,16 @@
#version 330 core
uniform sampler2D tex0;
in vec2 v_texCoord0;
out vec4 o_color;
void main() {
vec2 size = textureSize(tex0, 0);
vec2 pixelPosition = v_texCoord0;
vec2 centroidPixelPosition = texture(tex0, v_texCoord0).xy;
vec2 pixelDistance = (centroidPixelPosition - pixelPosition) * size * vec2(1.0, -1.0);
o_color = vec4(pixelDistance, 0.0, 1.0);
#version 330 core
uniform sampler2D tex0;
uniform sampler2D tex1;
in vec2 v_texCoord0;
out vec4 o_color;
void main() {
vec2 size = textureSize(tex0, 0);
vec2 pixelPosition = v_texCoord0;
vec2 centroidPixelPosition = texture(tex0, v_texCoord0).xy;
vec2 pixelDistance = (centroidPixelPosition - pixelPosition) * size * vec2(1.0, -1.0);
float threshold = texture(tex1, v_texCoord0).r;
o_color = vec4(pixelDistance, threshold, 1.0);
}