Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Compilation issue in clear_color.fs #1961

Closed
marulka opened this issue Oct 11, 2019 · 2 comments
Closed

Compilation issue in clear_color.fs #1961

marulka opened this issue Oct 11, 2019 · 2 comments

Comments

@marulka
Copy link

marulka commented Oct 11, 2019

Configuration

Firefox Reality version: 1.5
Firefox Reality build ID: -

Hardware: Samsung Galaxy S9+ (most likely irrelevant)
VR headset: Cardboard (Google VR)

Environment
OS: Ubuntu 18.04.3
Android Studio: 3.5.1
JRE: 1.8.0_202
JVM: OpenJDK 64bit
Android Gradle Plugin: 3.5.0
Gradle Version: 5.4.1
NDK: 20.0.5594570
Build SDK: API 28
Build Tools: 28.0.3

Steps to Reproduce

  1. Clone master branch from the github repository.
  2. Obtain project dependencies.
  3. Import project in Android Studio.
  4. Try to build project and run it on device.

Current Behavior

App is been built and run on the device, no solid background is rendered before the browser appears. No shader is loaded to be attached to the texture in Widget. [NOK]

Expected Behavior

App should have placeholder texture with clear color before the browser is rendered. [OK]

Possible Solution

Removing the 'f' symbol for float on line 9, 10 and 11. Solved the compile-time issue and shaders are compiled as expected.

Error Logs and Stack Traces

2019-10-11 16:19:02.740 25987-26073/org.mozilla.vrbrowser E/VRB: Failed to compile shader:
0:9: L0002: Undeclared variable 'f'
0:10: L0002: Undeclared variable 'f'
0:13: L0002: Undeclared variable 'color'
2019-10-11 16:19:02.740 25987-26073/org.mozilla.vrbrowser E/VRB: From source:

precision mediump float;

uniform sampler2D u_texture0;
varying vec4 v_color;
varying vec2 v_uv;

void main() {
  vec4 color = vec4(1.0f, 1.0f, 1.0f, 1.0f);
  if ((v_uv.x < 0.0f) || (v_uv.x > 1.0f)) {
    color.a = 0.0f;
  }
  gl_FragColor = color * v_color;
}

2019-10-11 16:19:02.740 25987-26073/org.mozilla.vrbrowser E/VRB: Failed to link program:
Link failed because of invalid fragment shader.

@jvonitter
Copy link
Contributor

Hey, thanks for filing this! We currently don't support Cardboard devices, so I'm closing as Won't Fix for now.

@marulka
Copy link
Author

marulka commented Oct 18, 2019

@jvonitter, seems like @bluemarvin already fixed it in the PR #2015

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants