StanislavPetrovV / Procedural-3D-scene-Ray-Marching

Procedural 3D scene Ray Marching
MIT License
27 stars 11 forks source link

Ошибка при запуске #1

Open Heler opened 2 years ago

Heler commented 2 years ago

Привет! Подскажи, пожалуйста, как пофиксить ошибки.

2022-01-31 04:17:25,101 - moderngl_window - INFO - Attempting to load window class: moderngl_window.context.pyglet.Window
2022-01-31 04:17:25,289 - moderngl_window.context.base.window - INFO - Context Version:
2022-01-31 04:17:25,290 - moderngl_window.context.base.window - INFO - ModernGL: 5.6.4
2022-01-31 04:17:25,290 - moderngl_window.context.base.window - INFO - vendor: Intel
2022-01-31 04:17:25,290 - moderngl_window.context.base.window - INFO - renderer: Intel(R) HD Graphics 4000
2022-01-31 04:17:25,290 - moderngl_window.context.base.window - INFO - version: 3.3.0 - Build 10.18.10.5161
2022-01-31 04:17:25,290 - moderngl_window.context.base.window - INFO - python: 3.8.7 (tags/v3.8.7:6503f05, Dec 21 2020, 17:59:51) [MSC v.1928 64 bit (AMD64)]
2022-01-31 04:17:25,291 - moderngl_window.context.base.window - INFO - platform: win32
2022-01-31 04:17:25,291 - moderngl_window.context.base.window - INFO - code: 330
2022-01-31 04:17:25,304 - moderngl_window.loaders.program.separate - INFO - Loading: T:\Procedural-3D-scene-Ray-Marching-main\programs\vertex.glsl
2022-01-31 04:17:25,304 - moderngl_window.loaders.program.separate - INFO - Loading: T:\Procedural-3D-scene-Ray-Marching-main\programs\fragment.glsl
2022-01-31 04:17:25,305 - moderngl_window.loaders.program.separate - INFO - Loading: hg_sdf.glsl
Traceback (most recent call last):
  File "T:/Procedural-3D-scene-Ray-Marching-main/main.py", line 25, in <module>
    mglw.run_window_config(App)
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\site-packages\moderngl_window\__init__.py", line 210, in run_window_config
    config = config_cls(ctx=window.ctx, wnd=window, timer=timer)
  File "T:/Procedural-3D-scene-Ray-Marching-main/main.py", line 11, in __init__
    self.program = self.load_program(vertex_shader='vertex.glsl', fragment_shader='fragment.glsl')
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\site-packages\moderngl_window\context\base\window.py", line 1358, in load_program
    return resources.programs.load(
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\site-packages\moderngl_window\resources\programs.py", line 33, in load
    return super().load(meta)
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\site-packages\moderngl_window\resources\base.py", line 52, in load
    return meta.loader_cls(meta).load()
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\site-packages\moderngl_window\loaders\program\separate.py", line 46, in load
    prog = shaders.create()
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\site-packages\moderngl_window\opengl\program.py", line 169, in create
    program = self.ctx.program(
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\site-packages\moderngl\context.py", line 1228, in program
    res.mglo, ls1, ls2, ls3, ls4, ls5, res._subroutines, res._geom, res._glo = self.mglo.program(
moderngl.error.Error: GLSL Compiler failed

fragment_shader
===============
ERROR: 0:727: 'pMod1' : no matching overloaded function found (using implicit conversion) 
ERROR: 0:753: 'res' : undeclared identifier 
ERROR: 0:753: 'assign' :  cannot convert from '2-component vector of float' to 'float'
ERROR: 0:754: 'fOpDifferenceColumnsID' : no matching overloaded function found (using implicit conversion) 
ERROR: 0:755: 'fOpUnionChamferID' : no matching overloaded function found (using implicit conversion) 
ERROR: 0:756: 'fOpUnionStairsID' : no matching overloaded function found (using implicit conversion) 
ERROR: 0:757: 'fOpUnionID' : no matching overloaded function found (using implicit conversion) 
ERROR: 0:758: 'fOpUnionID' : no matching overloaded function found (using implicit conversion) 
ERROR: 0:765: 'object' : undeclared identifier 
ERROR: 0:765: 'x' :  field selection requires structure, vector, or matrix on left hand side 
ERROR: 0:766: 'hit' : undeclared identifier 
ERROR: 0:766: 'assign' :  cannot convert from '2-component vector of float' to 'float'
ERROR: 0:767: 'x' :  field selection requires structure, vector, or matrix on left hand side 
ERROR: 0:767: 'x' :  field selection requires structure, vector, or matrix on left hand side 
ERROR: 0:768: 'y' :  field selection requires structure, vector, or matrix on left hand side 
ERROR: 0:768: 'y' :  field selection requires structure, vector, or matrix on left hand side 
ERROR: 0:769: 'x' :  field selection requires structure, vector, or matrix on left hand side 
ERROR: 0:769: 'x' :  field selection requires structure, vector, or matrix on left hand side 
ERROR: 0:771: 'object' : undeclared identifier 
ERROR: 0:804: 'm' : undeclared identifier 
ERROR: 0:804: 'assign' :  cannot convert from 'const 3-component vector of float' to 'float'
ERROR: 0:806: 'assign' :  cannot convert from '3-component vector of float' to 'float'
ERROR: 0:808: 'assign' :  cannot convert from 'const 3-component vector of float' to 'float'
ERROR: 0:811: 'assign' :  cannot convert from '3-component vector of float' to 'float'
ERROR: 0:813: 'm' : undeclared identifier 
ERROR: 0:854: 'col' : undeclared identifier 
ERROR: 0:854: 'render' : no matching overloaded function found (using implicit conversion) 
ERROR: 0:857: 'pow' : no matching overloaded function found (using implicit conversion) 
ERROR: 0:858: 'constructor' : not enough data provided for construction 
Process finished with exit code 1
Shayth commented 2 years ago

Кажется, проблема с hg.sdf.glsl У меня правда меньше ошибок - всего одна с функцией pMod1.