ShaderEditor icon indicating copy to clipboard operation
ShaderEditor copied to clipboard

Bug: touch events do not work at all

Open ghost opened this issue 4 years ago • 4 comments

Stock Samsung Galaxy M31s. Using the sample touch shader. Nothing is displayed at all, despite touching the screen.

ghost avatar Aug 24 '21 13:08 ghost

Hm, sorry 😬 Does touching the default shader work? There should be a visual change around a touch.

markusfisch avatar Aug 31 '21 19:08 markusfisch

Hm, sorry 😬 Does touching the default shader work? There should be a visual change around a touch.

Screenshot_20210831-214654_Shader Editor

This is with the visual indicator (in Android's programmer settings) enabled. Nothing is displayed.

The other two default shaders that also utilise touch (Game of Life and Cloudy Game of Life) also do not work.

ghost avatar Aug 31 '21 19:08 ghost

That's strange 🤔

Does the touch uniform work?

#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
#else
precision mediump float;
#endif

uniform vec2 resolution;
uniform vec2 touch;

void main(void) {
  float mx = max(resolution.x, resolution.y);
  vec2 uv = gl_FragCoord.xy / mx;
  vec3 color = max(color, smoothstep(
      0.085,
      0.08,
      distance(uv, touch.xy / mx)));
  gl_FragColor = vec4(color, 1.0);
}

markusfisch avatar Aug 31 '21 20:08 markusfisch

Screenshot_20210831-235325_Shader Editor

No response to touch, even if I use only one finger.

Screenshot_20210831-235456_Shader Editor

ghost avatar Aug 31 '21 21:08 ghost