Title: help with errors Post by: clacker on April 23, 2017, 03:32:07 AM I love so many of the things people have done in Fragmentarium and I enjoy programming so I thought it would be a good tool for me. However I've only downloaded a few examples anywhere that actually compiled, the large bulk of them do not. I understand they have dependencies and I download them from various places and add them, but even when people give me the whole chain of frag files used I still can't get them to run. My questions are
1) Is an NVIDIA GForce 940MX video card unusable for some fragments? All of the samples and examples that come with Fragmentarium seem to run fine. 2) No files seem to come with a #version directive even though Fragmentarium sometimes seems to require it (but other times not?). Is there a way to check to see what version of glsl I'm running? I've been using #version 120 and #version 440 3) I need help understanding the error messages so I can find where the errors actually are. Take for example this example I found at http://c-jr.deviantart.com/art/Gnarl3D-script-for-Fragmentarium-with-colorpalette-583540720 (http://c-jr.deviantart.com/art/Gnarl3D-script-for-Fragmentarium-with-colorpalette-583540720) that I really liked. It came bundled with all of the frags so I thought it should work OK. In both Fragmentarium Version 1.0.0 ("Cologne") and Version 1.0.30.170115 ("3Dickulus") I get the same errors: Could not create fragment shader: WARNING: 1:10: '' : #version directive missing WARNING: 1:248: Unary operation folding into constant is supported in newer GLSL versions ERROR: 1:1282: 'assign' : cannot convert from 'highp float' to 'in 3-component vector of highp float' Failed to compile script (80 ms). I can't tell where the errors occur in the fragment code. What do 1:10, 1:248, and 1:1282 signify? They can't be line numbers? When I add a #version 120 or #version 440 to the start of the Gnarl3D.frag it reduces to one error: Could not create fragment shader: ERROR: 2:1282: 'assign' : cannot convert from 'highp float' to 'in 3-component vector of highp float' Failed to compile script (67 ms). Thanks for any help you can provide Title: Re: help with errors Post by: 3dickulus on April 23, 2017, 08:22:25 AM attach the frag and I'll have a look, the ones I find by following the link above seem to work fine, do you compile Fragmentarium from source or use one of the precompiled win exe files?
if your frag is from another platform like shadertoy then it will need some tweaking to make it compatible with Fragmentarium when you first run Fragmentarium you should see some lines in the log window like... Code: NVIDIA Corporation GeForce GTX 760/PCIe/SSE2 Title: Re: help with errors Post by: clacker on April 23, 2017, 02:16:47 PM I am using the pre-compiled versions of 1.0.0 ("Cologne") and 1.0.30.170115 ("3Dickulus") on a 64 bit computer running windows 10. I could compile them but I thought the "stock" versions would be more stable.
I can see in the Cologne version of Fragmentarium that Code: This video card supports: OpenGL1.1, OpenGL1.2, OpenGL1.3, OpenGL1.4, OpenGL1.5, OpenGL2.0, OpenGL2.1, OpenGL3.0 The frag I tried to run is gnarl3d.frag from the attached link. I'm attaching it here again just in case. When I tried to run it I could see all of the dependencies loaded from that folder. I tried to make sure I ran all of the included examples to see if any of those failed. Interesting clue: "Burning Ship" ran on cologne but failed on 3dikulus for no #version and "Could not create fragment shader: ERROR: 2:278: 'cDiv' : function already has a body." When I looked at the code for "Progressive2D.frag" the third line in the code reads #buffer RGBA32F in cologne but reads Title: Re: help with errors Post by: 3dickulus on April 23, 2017, 08:46:51 PM Gnarl3D.frag runs fine here with one minor warning...
Code: 0(1285) : warning C7011: implicit cast from "float" to "vec3" 1. if you have installed the 3Dickulus version with the online installer there are 4 exes to choose from, try #3 or #4 with nonv in the filename if your card does not support GL4+ 2. "Burning Ship" uses Complex.frag where cDiv() lives, examining Complex.frag I find that cDiv() is declared twice :( oops, just open Complex.frag (menu Examples/Include/Complex.frag) and comment one of them out or delete one and save the file, Burning Ship runs fine. My appologies for letting that one slip through :angry: 3. as for 4. all of the highlighting is controlled by Misc/glsl.xml near the end of this file are settings for color,strike,bold etc. you can set this up any way you like so if I hope this helps :D edit: I will look into better integration of Fragmentarium key word conflicts in the Misc/glsl.xml file ... maybe add a "highlighter editing dialog" ? Title: Re: help with errors Post by: clacker on April 24, 2017, 12:20:34 AM 3Dickulus, thank you so much for the help. If the strike-through means my card doesn't understand the keyword that's probably why it won't run. I like seeing where the errors are, I'll leave that on!
I just uninstalled and re-ran the installer again. Using the defaults on the installer only "Fragmentarium-1.0.30-nv-exr.exe" was installed. I ran the maintenancetool.exe again to add or remove components and noticed the checkbox for "Main Program" was not checked but filled with a solid black box. I checked it and now I have all four exes. I don't know if you could check that box in the installer by default but there would be no way for me to know other exes existed if I hadn't read your response. I tried the gnarld 3d again using the "Fragmentarium-1.0.30-nonv-noexr" and I still got the same "Could not create fragment shader: ERROR: 2:1282: 'assign' : cannot convert from 'highp float' to 'in 3-component vector of highp float'" error. I believe this error means somewhere the code is trying to assign a float to a vec3. My problem is finding that place. Is there any way to find the line number the error occurs on? I believe in lower versions of glsl that's an error and not just a warning. That's what I really want: a way for me to find an error and fix it. 1) Your version of DE-Kn8.frag in include has line 37 as #include "3DKn-test-1.0.4.frag" I think it should be #include "3DKn-1.0.4.frag" 2) DomainDistortion2.frag, Droste.frag, DrosteGrid.frag, run fine in 'cologne' but give a Failed to bind previewBuffer FBO in "Fragmentarium-1.0.30-nonv-noexr" Title: Re: help with errors Post by: clacker on April 24, 2017, 02:05:08 AM So I found the error in that one file. I had to comment out sections of code until the error went away, then remove comments until it returned. It turns out it was on line 91:
p=5.*(z.z-mag); should be p=vec3(5.*(z.z-mag)); Title: Re: help with errors Post by: 3dickulus on April 24, 2017, 03:19:12 AM O0 ty
for that particular keyword as you move the cursor in the text editor you should see... Code: Position:164, Line:8. Line in preprocessed script:799 to see the preprocessed script select Render->Output Preprocessed Script from the menu, this will open a new tab with the complete fragment code as it is sent to the GPU, you will have to locate the line number in this file and then locate the error in the frag file that contributed the error. I know, it should be automated. the checkbox for "Main Program" should have a "+" next to it indicating a branch in the tree, click it and all exes are listed, the default is nv-exr, selecting the checkbox at the branch installs everything under it ;) look at Examples/Include/MathUtils.frag, try commenting out everything between #ifdef WANG_HASH and the closing #endif Title: Re: help with errors Post by: clacker on April 24, 2017, 04:30:47 AM Fantastic! Using the Output Preprocessed Script I can find the line numbers, which means I can finally see what is causing the errors. I was trying one frag that gave errors for a rand function, which I can now see and try to sort out. The numbers work better in the cologne version, in the 3Dikulus version they don't always line up with the error but they're close.
I think a few of the strikeouts are incorrect. I see strikeouts for: varying gl_Vertex gl_ProjectionMatrix gl_FragColor texture2D Thanks again for your help. Title: Re: help with errors Post by: 3dickulus on April 24, 2017, 06:45:37 AM look at Examples/Include/MathUtils.frag, try commenting out everything between #ifdef WANG_HASH and the closing #endif ^ ^ ^ this is used in the rand functions ^ ^ ^I think a few of the strikeouts are incorrect. I see strikeouts for: varying gl_Vertex gl_ProjectionMatrix gl_FragColor texture2D these should be remedied with the correct #version nnn , use it as the first line in the frag code in the editor, #version 120 iirc Title: Re: help with errors Post by: clacker on April 25, 2017, 01:12:10 AM Using #version 120 did get rid of those strikeouts.
Now that I know how to find where the errors, I have been able to run the files that were giving my problems. For whatever reason other people get warnings while I get errors. One example was: Code: Could not create fragment shader: ERROR: 1:183: 'rand' : no matching overloaded function found (using implicit conversion) Code: float rand(float oo){Thanks again for your help, I can't wait to dive in now and start making thing happen. Title: Re: help with errors Post by: 3dickulus on April 25, 2017, 04:12:10 AM I have not seen this rand() error ??? but I'm glad you've found a fix :D
you could also call rand(vec2(float)) I will try to hunt that one down and make sure it's fixed so others don't stumble on it... I look forward to seeing some of your creations :beer: Title: Re: help with errors Post by: Sabine on April 25, 2017, 10:52:11 AM I'm reading this thread with interest as I encounter lots of errors when loading examples, f.i. :Failed to bind preview buffer FBO in f.i. PenroseTiles.frag, which load very well in Syntopia's version.
@3dickulus, a question: does the maintenance-tool overwrite the whole Example-section? I know it does download the whole folder with every update. It seems I have a weird 3DKn-1.0.5 version with only 270 lines there... Title: Re: help with errors Post by: clacker on April 25, 2017, 02:24:19 PM I've noticed that "Failed to bind previewBuffer FBO" error anytime a file has #include "2D.frag". If I add #buffer RGBA8 or a #buffer RGBA32F to the start of the file the fragment runs just like it does on the 'cologne' version. Maybe the 'cologne' version sets up the buffer for you if you leave it out?
Title: Re: help with errors Post by: Sabine on April 25, 2017, 03:59:31 PM Thanks a lot for that tip, clacker! Works perfectly, though buffer has a strikethrough;)
Without it the log reads: "Created front and back buffers as ", with it as "Created front and back buffers as RGBA32F". 2D.frag does not have a line to define the buffer, but Progressive2D.frag has. So added the line to the 2D.frag, seems to work ok. Title: Re: help with errors Post by: 3dickulus on April 26, 2017, 02:23:32 AM @Sabine 3DKn-1.0.5 should have 325 lines, that's what I have here in the repo ???
maintenance-tool should only be grabbing the changes, the Examples folder is one chunk so if anything in it changes it will dld the whole thing but just once, not every time you run it, unless you use Add/Remove components and have it selected or if something has changed in the folder. "Failed to bind previewBuffer FBO" will happen if #buffer isn't defined, it should be defined in all of the include files that require it but I suppose a few of the less used ones may have been neglected :embarrass: I'll try to get that cleaned up :beer: edit: hmmm should look at why FragM isn't setting the #buffer to a default when it's not present... next update ;) Title: Re: help with errors Post by: Sabine on April 26, 2017, 12:15:22 PM @3dickulus I thought I'd be smart by downloading the Example.zip from your site, but no such thing as 3DKn-1.0.5 in there:}
Then threw away my Examples folder and hoped the maintenancetool would notice, but it didn't;) :laugh: So now un- and reinstalled. And in the fresh install I have a brandnew 3DKn-1.0.5.frag with... 270 lines :crazyeyes: You tell me;) Btw, the missing definition of buffer in the 2D.frag: It's missing in all three versions of Fragmentarium I have on this machine, I even downloaded Syntopia's version just to check, so certainly not Your doing! If I can assist in any way (going through raytracers and their dependencies etc) let me know :) Title: Re: help with errors Post by: 3dickulus on April 27, 2017, 02:34:31 AM did some checking...
my mistake, the repo version has 270 lines, 3DKn-1.0.5.frag has "equirectangular" code added and has some things removed (compared to my local working version) that are now found in "MathUtil.frag" so essentially it's fine and not missing anything. sorry maintenancetool isn't terribly smart, from it's local records it thinks it already installed Examples so if it was manually removed then maintenancetool will not re-install, if you removed Examples with maintenancetool Add/Remove Components and it won't re-add the component then it's a lot dumber than I thought 88) a missing #buffer statement should be handled by automagically adding it and/or notifying the user in the log window with a yellow warning line I think there was a transition point where the rendering and color processing were split into separate fragment programs and some frags just never got updated. it would be nice to have the Examples folder and frags cleaned up a bit, certainly, if you find a problem/bug or an example that fails I'll try to fix it up for the next update. :beer: Title: Re: help with errors Post by: Sabine on April 27, 2017, 01:13:50 PM did some checking... Hm, I think it might be missing the definition of the rand-function though, it now only has rand2... And rand does not come with complex.frag.my mistake, the repo version has 270 lines, 3DKn-1.0.5.frag has "equirectangular" code added and has some things removed (compared to my local working version) that are now found in "MathUtil.frag" so essentially it's fine and not missing anything. Quote it would be nice to have the Examples folder and frags cleaned up a bit, certainly, if you find a problem/bug or an example that fails I'll try to fix it up for the next update. Might get some time in the next days to give them all a run and where necessary some debugging if that falls within my capabilities. Will let you know what I find. Title: Re: help with errors Post by: clacker on May 01, 2017, 02:23:31 PM I found some things in the latest upload that still give me problems:
line 46 of Examples->Kali's Creations->RotJulia.frag change from orbitTrap=10000; to orbitTrap=vec4(10000); line 37 of Examples->Include->DE-Kn8.frag change from #include "3DKn-test-1.0.4.frag" to #include "3DKn-1.0.4.frag" Examples->Theory->Mandelbox - Dual Numbers DE - Slicer.frag crashed, all four versions: Fragmentarium-1.0.30-nonv-noexr.exe has stopped working on 'cologne' I get errors but no crash: Could not link shaders: The fragment shader uses varying dirDx, but previous shader does not write to it. The fragment shader uses varying dirDy, but previous shader does not write to it. Out of resource error. Failed to compile script (30 ms). Examples->Theory->Mandelbulb-Slicer.frag crashed, all four versions: Fragmentarium-1.0.30-nonv-noexr.exe has stopped working on 'cologne' I get errors but no crash: Could not link shaders: The fragment shader uses varying dirDx, but previous shader does not write to it. The fragment shader uses varying dirDy, but previous shader does not write to it. Out of resource error. Failed to compile script (55 ms). Examples->Theory->Mandelbox - Dual Numbers DE.frag Could not find: AntiAlias Could not find: BoundingSphere Could not find: foldingValue (just warnings but none from 'cologne') Title: Re: help with errors Post by: Sabine on May 01, 2017, 05:53:59 PM Ran the Theory-files on my machine and no problems at all with the two slicers... Really weird that they should cause havoc on yours :( The Examples->Theory->Mandelbox - Dual Numbers DE.frag-messages: many examples are very old, dating back to 5 or 6 years back. All the raytracers are ever-changing, things are added, things are thrown out, and sometimes a formula has been first run with a raytracer that no longer exists at all or has been one someone has written for himself to test things in. When you then run the formula with a modified or other raytracer you get these Couldn't find-messages in yellow. You will encounter many many messages like that (évery time you change your raytracer, for instance), and they are no problem at all. You will notice that if you add your own presets those will not have any messages like that as your presets are made for your current raytracer. I did not spot that error in the DE-Kn8.frag, I only opened and ran the examples looking for errors that would prevent them from running. Good job that you noticed this! Also we may safely expect that none of the examples uses this raytracer;) Examples->Kali's Creations->RotJulia.frag Thanks for solving that. I see those kinds of errors quite often, but my knowledge of maths is non existent, so I never know when I can safely change the formula code (do so privately of course ;D ;D ;D). |