Closed Vuldraq closed 5 years ago
Is this just running the demo app unmodified, or have you made changes?
Try uncommenting line 70 of 'shader.py' under where it says 'Debugging the shader'. After running again, check the new 'frag_gen.glsl' file and see what the error looks like on line 66.
Yes, this is using all the files unmodified, using the demo file, even after re-downloading the problem persists.
After uncommenting that line of code, line 66 of the new 'frag_gen.glsl' file is:
void planeFold(inout vec4 z, vec3 n, float d=0.0) {
Here is the full method:
void planeFold(inout vec4 z, vec3 n, float d=0.0) { z.xyz -= 2.0 * min(0.0, dot(z.xyz, n) - d) * n; }
Found an identical issue here: https://community.amd.com/thread/167874 I guess this feature is not officially supported on all GLSL compilers. I'll try to make a workaround for this.
EDIT: Can you test if just removing the '=0.0' on that line fixes everything? I think that's all you need. To be precise, its line 31 of frag.glsl, NOT frag_gen.glsl
line 31 Is just a bunch of ####, I have pretty much the same error
PySpace-master/pyspace/shader.py", line 92, in compile_shader
/PySpace-master/pyspace/shader.py", line 102, in compile_program
PySpace-master/pyspace/shader.py", line 73, in compile
/PySpace-master/ray_marcher_demo.py", line 253, in
I have been trying to run the bat file and it's not working. It's not compiling.
I tried fixing it as it suggested and ended up with a new error.
@Quruzz open a new issue (and use python 2, or the python 3 PR)
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.
receiving the same issue when trying to run this script unmodified on python2 and python3 on MacOS Mojave
I'm pretty sure this issue is the same as #8 and should be resolved now.
Upon running, I receive the following error message:
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.