question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fragment shader failed to compile

See original GitHub issue

Upon running, I receive the following error message:

Compiling Vertex Shader...
Compiling Fragment Shader...
Fragment shader failed to compile with the following errors:
ERROR: 0:66: error(#132) Syntax error: "=" parse error
ERROR: error(#273) 1 compilation errors.  No code generated

Traceback (most recent call last):
  File "ray_marcher_demo.py", line 253, in <module>
    program = shader.compile(camera)
  File "shader.py", line 73, in compile
    program = self.compile_program(v_shader, f_shader)
  File "shader.py", line 106, in compile_program
    fragment_shader = self.compile_shader(fragment_source, GL_FRAGMENT_SHADER)
  File "shader.py", line 92, in compile_shader
    raise ValueError, 'Shader compilation failed'
ValueError: Shader compilation failed

No idea if i’m doing something wrong here, (still relatively new to coding and GitHub), although I haven’t altered the file in any way, and have all the required dependencies, but thought i would bring it up anyway.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
slowkowcommented, Jan 16, 2019

I get the same error, just running the script after cloning from github:

$ python ray_marcher_demo.py
pygame 1.9.4
Hello from the pygame community. https://www.pygame.org/contribute.html
Compiling Vertex Shader...
ERROR: 0:1: '' :  version '330' is not supported
ERROR: 0:1: '' : syntax error: #version
ERROR: 0:2: '(' : syntax error: Array size must appear after variable name

Traceback (most recent call last):
  File "ray_marcher_demo.py", line 253, in <module>
    program = shader.compile(camera)
  File "github.com/HackerPoet/PySpace/pyspace/shader.py", line 73, in compile
    program = self.compile_program(v_shader, f_shader)
  File "github.com/HackerPoet/PySpace/pyspace/shader.py", line 102, in compile_program
    vertex_shader = self.compile_shader(vertex_source, GL_VERTEX_SHADER)
  File "github.com/HackerPoet/PySpace/pyspace/shader.py", line 92, in compile_shader
    raise ValueError, 'Shader compilation failed'
ValueError: Shader compilation failed
(

$ conda list
# packages in environment at miniconda3/envs/py27:
#
# Name                    Version                   Build  Channel
ca-certificates           2018.03.07                    0
certifi                   2018.11.29               py27_0
libcxx                    4.0.1                hcfea43d_1
libcxxabi                 4.0.1                hcfea43d_1
libedit                   3.1.20170329         hb402a30_2
libffi                    3.2.1                h475c297_4
ncurses                   6.1                  h0a44026_1
numpy                     1.16.0                    <pip>
openssl                   1.1.1a               h1de35cc_0
pip                       18.1                     py27_0
pygame                    1.9.4                     <pip>
pyopengl                  3.1.1a1                  py27_0
python                    2.7.15               h8f8e585_6
readline                  7.0                  h1de35cc_5
setuptools                40.6.3                   py27_0
sqlite                    3.26.0               ha441bb4_0
tk                        8.6.8                ha441bb4_0
wheel                     0.32.3                   py27_0
zlib                      1.2.11               h1de35cc_3

$ python2 --version
Python 2.7.15 :: Anaconda, Inc.
3reactions
sharad-scommented, Jan 19, 2019

receiving the same issue when trying to run this script unmodified on python2 and python3 on MacOS Mojave

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vertex Shader and Fragment Shader(s) failed to compile ...
Vertex and Fragment shader(s) were not successfully compiled before glLinkProgram() was called. Link failed. Shaders failed to link! Enter any ...
Read more >
Failed to compile fragment shader · Issue #1644 · tensorflow/tfjs
I get the following error whenever I try to load model from indexeddb. Predict works in case of using the mobilenet model hosted...
Read more >
Fragment Shader Compiling error. : r/opengl - Reddit
I have an issue with the minecraft shader pack SEUS PTGI 5 from Cody Darr's Patreon. The shader pack causes the application to...
Read more >
Failed to compile fragment shader - Google Groups
I am having an issue similar to #177. When running on chrome I get the error "Failed to compile fragment shader" when I...
Read more >
Fragment shader failed to compile. Compile log: ERROR: 0 ...
This is the error message: RuntimeError: Fragment shader failed to compile. Compile log: ERROR: 0:111: 'undefined' : undeclared identifier
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found