{"action":"created","issue":{"url":"https://api.github.com/repos/stackgl/headless-gl/issues/26","labels_url":"https://api.github.com/repos/stackgl/headless-gl/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/stackgl/headless-gl/issues/26/comments","events_url":"https://api.github.com/repos/stackgl/headless-gl/issues/26/events","html_url":"https://github.com/stackgl/headless-gl/issues/26","id":105427361,"number":26,"title":"GLSL GL_ES precision directives yield shader compile errors (Linux)","user":{"login":"bsergean","id":11857745,"avatar_url":"https://avatars.githubusercontent.com/u/11857745?v=3","gravatar_id":"","url":"https://api.github.com/users/bsergean","html_url":"https://github.com/bsergean","followers_url":"https://api.github.com/users/bsergean/followers","following_url":"https://api.github.com/users/bsergean/following{/other_user}","gists_url":"https://api.github.com/users/bsergean/gists{/gist_id}","starred_url":"https://api.github.com/users/bsergean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsergean/subscriptions","organizations_url":"https://api.github.com/users/bsergean/orgs","repos_url":"https://api.github.com/users/bsergean/repos","events_url":"https://api.github.com/users/bsergean/events{/privacy}","received_events_url":"https://api.github.com/users/bsergean/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-08T17:07:29Z","updated_at":"2015-09-08T17:47:39Z","closed_at":null,"body":"```\r\nTHREE.WebGLShader: Shader couldn't compile.\r\nTHREE.WebGLShader: gl.getShaderInfoLog() 0:1(1): error: syntax error, unexpected NEW_IDENTIFIER\r\n 1: precision highp float;\r\n2: precision highp int;\r\n```\r\n\r\nEven if ANGLE has a shader transpiler that maps ESSL -> conforming GLSL in whatever environment you are running on, this doesn't seem to be working on Linux.\r\n\r\nI have tried to strip out such precision directives by removing them from the source in the shaderSource wrapper and the errors go away and my code starts working (yeah), but it feels dirty / gross. I wonder if C++ some code needs to be run to tell ANGLE to transpile the shaders.\r\n\r\nHere is the code that does that for reference:\r\n\r\nhttps://github.com/bsergean/headless-gl/commit/92d1f7220979165aa0ae6d6071ee70191f564cea"},"comment":{"url":"https://api.github.com/repos/stackgl/headless-gl/issues/comments/138646501","html_url":"https://github.com/stackgl/headless-gl/issues/26#issuecomment-138646501","issue_url":"https://api.github.com/repos/stackgl/headless-gl/issues/26","id":138646501,"user":{"login":"bsergean","id":11857745,"avatar_url":"https://avatars.githubusercontent.com/u/11857745?v=3","gravatar_id":"","url":"https://api.github.com/users/bsergean","html_url":"https://github.com/bsergean","followers_url":"https://api.github.com/users/bsergean/followers","following_url":"https://api.github.com/users/bsergean/following{/other_user}","gists_url":"https://api.github.com/users/bsergean/gists{/gist_id}","starred_url":"https://api.github.com/users/bsergean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsergean/subscriptions","organizations_url":"https://api.github.com/users/bsergean/orgs","repos_url":"https://api.github.com/users/bsergean/repos","events_url":"https://api.github.com/users/bsergean/events{/privacy}","received_events_url":"https://api.github.com/users/bsergean/received_events","type":"User","site_admin":false},"created_at":"2015-09-08T17:47:39Z","updated_at":"2015-09-08T17:47:39Z","body":"(btw I didn't really monkey-patch, I just forked headless-gl). I'll see if monkey-patching works.\r\n\r\nAnd yes there will be a maintenance burden to put those #ifdef + I guess that 99% of the use case of three are and will always be in the browser.\r\n\r\nUp to you guys."}}