3Dickulus / FragM

Derived from https://github.com/Syntopia/Fragmentarium/
GNU General Public License v3.0
349 stars 30 forks source link

Could not create vertex shader: ERROR: 0:1: '' : #version required and missing. ERROR: 3:27: 'varying' : syntax error: syntax error #142

Closed drjyeh closed 4 years ago

drjyeh commented 4 years ago

On MacBook Air 13-inch, Mid 2012, macOS Mojave Version 10.14.6

I get the following error during build: Vendor: Intel Inc. Renderer: Intel HD Graphics 4000 OpenGL Engine GL Driver: 4.1 INTEL-12.10.12 Using GL 4.1 Core profile

Available image formats: bmp, cur, heic, heif, icns, ico, jp2, jpeg, jpg, pbm, pgm, png, ppm, tif, tiff, wbmp, webp, xbm, xpm

Parse: /private/var/folders/0z/k4h7msd90sggcb6lzcwnrgjw0000gn/T/AppTranslocation/3D6A66EE-270F-4150-BA97-DD6E80F260DF/d/Fragmentarium-2.5.3.app/Contents/MacOS/Examples/Historical 3D Fractals/Mandelbulb.frag Including file: /private/var/folders/0z/k4h7msd90sggcb6lzcwnrgjw0000gn/T/AppTranslocation/3D6A66EE-270F-4150-BA97-DD6E80F260DF/d/Fragmentarium-2.5.3.app/Contents/MacOS/Examples/Include/MathUtils.frag Including file: /private/var/folders/0z/k4h7msd90sggcb6lzcwnrgjw0000gn/T/AppTranslocation/3D6A66EE-270F-4150-BA97-DD6E80F260DF/d/Fragmentarium-2.5.3.app/Contents/MacOS/Examples/Include/DE-Raytracer.frag Including file: /private/var/folders/0z/k4h7msd90sggcb6lzcwnrgjw0000gn/T/AppTranslocation/3D6A66EE-270F-4150-BA97-DD6E80F260DF/d/Fragmentarium-2.5.3.app/Contents/MacOS/Examples/Include/3D.frag Including buffershader: /private/var/folders/0z/k4h7msd90sggcb6lzcwnrgjw0000gn/T/AppTranslocation/3D6A66EE-270F-4150-BA97-DD6E80F260DF/d/Fragmentarium-2.5.3.app/Contents/MacOS/Examples/Include/BufferShader.frag Parse: /private/var/folders/0z/k4h7msd90sggcb6lzcwnrgjw0000gn/T/AppTranslocation/3D6A66EE-270F-4150-BA97-DD6E80F260DF/d/Fragmentarium-2.5.3.app/Contents/MacOS/Examples/Include/BufferShader.frag Mandelbulb Distance Estimator Simple 3D Setup 5 locked variables: NormalBackStep,HardShadow,Reflection,DebugSun,EnableFloor Maximum texture size: 16384x16384 Camera: Use W/S to fly. 1/3 adjusts speed. Q/E rolls. Click on 3D window for key focus. See Help Menu for more. Created front and back buffers as RGBA32F Could not create vertex shader: ERROR: 0:1: '' : #version required and missing. ERROR: 3:27: 'varying' : syntax error: syntax error

Failed to compile script (30 ms).

To Reproduce

  1. Click on Build during start screen.
  2. If I add the following line at the beginning of Mandelbulb Distance Estimator: "#version 330 core" I get the following: Could not create vertex shader: ERROR: 3:27: 'varying' : syntax error: syntax error

Failed to compile script (21 ms).

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

3Dickulus commented 4 years ago

try #version 410 compatibility ?

edit: I say this because FragM detects compatibility request and will try to use compatibility mode internally, compiled against GL4.1 core for Mac with the "include deprecated functions" flag set, that may allow a frag to run under a pseudo compatibility mode on Macs.

3Dickulus commented 4 years ago

you may also have to update the frags you're using from varying to in/out edit: also FragM is developed on nVidia, I don't have Intel gfx to test with. It does run on AMD Radeon RX 580

3Dickulus commented 4 years ago

Added 3 files to the Examples/3DickUlus folder that may be of use...

3D-gl4.frag
BufferShader-gl4.frag
DE-Raytracer-gl4.frag

these can be placed in the Examples/Include folder for testing or copy them and the user frag you are modifying into their own test folder, just replace the raytracer line in any user frag... #include "DE-Raytracer.frag" to #include "DE-Raytracer-gl4.frag"

they use layout(location = 0) in vec4 vertex_position; and uniform mat4 projectionMatrix; instead of the older builtin gl_Vertex and gl_ProjectionMatrix

edit: if I hear nothing back regarding this can I assume this issue can be closed?

claudeha commented 4 years ago

drjyeh:

On MacBook Air 13-inch, Mid 2012, macOS Mojave Version 10.14.6

3Dickulus:

try #version 410 compatibility ?

I think macOS X only does OpenGL 4.1 in Core Profile (no support for Compatibility Profile). The GLSL version string is #version 410 core for this profile.

3Dickulus commented 4 years ago

try #version 410 compatibility ?

edit: I say this because FragM detects compatibility request and will try to use compatibility mode internally, compiled against GL4.1 core for Mac with the "include deprecated functions" flag set, that may allow a frag to run under a pseudo compatibility mode on Macs.