glsl-livecoder.js:148 Error: Command failed: glslangValidator.exe
See original GitHub issueイケイケなプラグインありがとうございます!!
I’m having trouble running the plugin on Windows.
I’ve added glsllangValidator.exe to the PATH environment variable and it seems to be ok with finding the binary. I’m not sure where the problem might be, so if you have any ideas it would be much appreciated.
Here are my packages:
Community Packages (36) C:\Users\rikuo\.atom\packages
├── atom-material-ui@2.0.4
├── autocomplete-glsl@0.2.3
├── autocomplete-haskell@0.7.2
├── busy-signal@1.4.3
├── custom-folds@1.9.4
├── editor-background@1.2.38
├── editor-stats@0.17.0
├── file-icons@2.1.9
├── fonts@3.0.2
├── glsl-livecoder@0.4.0
├── haskell-ghc-mod@1.19.9
├── highlight-selected@0.13.1
├── ide-haskell@1.9.6
├── ide-haskell-cabal@1.9.2
├── ide-haskell-hasktags@0.0.11
├── ide-haskell-repl@0.6.0
├── intentions@1.1.3
├── japanese-word-selection@0.4.0
├── language-elm@1.5.0
├── language-glsl@2.0.1
├── language-haskell@1.12.1
├── language-markdown@0.25.1
├── language-rust@0.4.11
├── linter@2.2.0
├── linter-csslint@1.3.4
├── linter-eslint@8.2.1
├── linter-glsl@2.1.3
├── linter-hlint@1.0.1
├── linter-ui-default@1.6.3
├── minimap@4.29.2
├── minimap-git-diff@4.3.1
├── minimap-highlight-selected@4.6.1
├── minimap-pigments@0.2.2
├── pigments@0.39.1
├── remote-atom@1.3.10
└── tidalcycles@0.9.1
Here is the shader file
precision highp float;
uniform vec2 resolution;
uniform float time;
float lengthN(vec3 v, float p)
{
vec3 tmp = pow(abs(v), vec3(p));
return pow(tmp.x+tmp.y+tmp.z, 1.0/p);
}
vec3 replicate(vec3 p){
return mod(p, 8.0) - 4.;
}
float distanceFunction(vec3 p)
{
vec3 t = vec3(1.);
p = replicate(p);
vec2 q = vec2(length(p.xz)-t.x,p.y);
return length(q)-t.y;
}
vec3 getNormal(vec3 p){
const float d = 0.0001;
return normalize(vec3(
distanceFunction(p+vec3(d,0.,0.)) - distanceFunction(p+vec3(-d,0.,0.)),
distanceFunction(p+vec3(0.,d,0.)) - distanceFunction(p+vec3(0.,-d,0.)),
distanceFunction(p+vec3(0.,0.,d)) - distanceFunction(p+vec3(0.,0.,-d))
));
}
void main() {
//画面の座標系を左下(-x/y, -1)→右上(x/y, 1)、中心(0,0)に変換する
vec2 pos = (gl_FragCoord.xy * 2.0 - resolution) / resolution.y;
//カメラ位置や向きを指定する
vec3 camPos = vec3(0.0, 0.0, 3.0);
vec3 camDir = vec3(0.0, 0.0, -1.0);
vec3 camUp = vec3(0.0, 1.0, 0.0);
vec3 camSide = cross(camDir, camUp);
float focus = 1.8;
//画面のピクセルに応じてRayを放つ
vec3 rayDir = normalize(camSide*pos.x + camUp*pos.y + camDir*focus);
float t = 0.0,
d;
vec3 posOnRay = camPos;
for(int i=0; i<64; i++)
{
d = distanceFunction(posOnRay);
t += d;
posOnRay = camPos + t*rayDir;
}
vec3 normal = getNormal(posOnRay);
if(abs(d) < 0.001)
{
gl_FragColor = vec4(normal, 1.);
}else
{
gl_FragColor = vec4(0.0);
}
}
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:6 (6 by maintainers)
Top Results From Across the Web
What is the correct way to set the Glsland Validator Path on ...
I tried that and still get the same error: GLSL Lint: Failed to spawn 'glslangValidator' binary. Error: spawn C:/glslang/bin/glslangValidator.
Read more >OpenGL / OpenGL ES Reference Compiler
Basic use from the command line is simple. Put your shader in a file, e.g., shader.frag, and execute: glslangValidator shader.frag. Any GLSL errors...
Read more >glslangValidator - OpenGL (ES) Shading Language ...
The purpose of the reference compiler is to identify shader portability issues. If glslang accepts a shader without errors, then all OpenGL and...
Read more >Shader modules
Although we can use this compiler directly via glslangValidator.exe ... Programs written in it have a main function that is invoked for every...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you!!
It seems https://github.com/fand/glsl-livecoder/pull/4 solved the problem. I succeeded to run shaders on my Windows VM.
I just published v0.4.1. Please try it! @Spaghet