Logo by Cyclops - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Visit the official fractalforums.com Youtube Channel
 
*
Welcome, Guest. Please login or register. April 19, 2024, 01:52:51 PM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1] 2   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: help with errors  (Read 1829 times)
0 Members and 2 Guests are viewing this topic.
clacker
Forums Freshman
**
Posts: 16


« 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 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

Logged
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #1 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
This video card supports: OpenGL , 1.1, 1.2, 1.3, 1.4, 1.5, 2.0, 2.1, 3.0, 3.2, 3.3, 4.0, 4.1, 4.2, 4.3
Available output formats: bmp, cur, dds, icns, ico, jp2, jpeg, jpg, pbm, pgm, png, ppm, tif, tiff, wbmp, webp, xbm, xpm, exr
...showing GLSL versions supported by your gfx card and recognized image formats you can use for loading textures and saving image files.
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
clacker
Forums Freshman
**
Posts: 16


« Reply #2 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 3dikulus version does not show these lines when the program starts.  Is it only on the first start of the program or is that a symptom of my problem.  Do I need a higher OpenGL version to run the program?

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 #buffer RGBA32F in the 3dikulus version.  Why does the word "buffer" have a strikethrough?


Logged
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #3 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 sad 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 #buffer this word is a Fragmentarium key word and will get strike through if the GLSL #version used does not contain this word or if it's a "reserved" word

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 #buffer really bothers you, you can change it to whatever you like.

I hope this helps cheesy

edit: I will look into better integration of Fragmentarium key word conflicts in the Misc/glsl.xml file ... maybe add a "highlighter editing dialog" ?
« Last Edit: April 23, 2017, 09:23:02 PM by 3dickulus, Reason: info » Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
clacker
Forums Freshman
**
Posts: 16


« Reply #4 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"
Logged
clacker
Forums Freshman
**
Posts: 16


« Reply #5 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));
Logged
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #6 on: April 24, 2017, 03:19:12 AM »

 afro ty

for that particular keyword #buffer the strike out is wrong, the highlighting algorithm neglects the "#" in front of it, there may be a few more like that but it does not impact the nVidia fragment compiler bc the Fragmentarium key words are stripped out before the compile-link-execute cycle.

as you move the cursor in the text editor you should see...
Code:
Position:164, Line:8. Line in preprocessed script:799
...in the status bar at the bottom of the window

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 wink

look at Examples/Include/MathUtils.frag, try commenting out everything between #ifdef WANG_HASH and the closing #endif
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
clacker
Forums Freshman
**
Posts: 16


« Reply #7 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.
Logged
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #8 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
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
clacker
Forums Freshman
**
Posts: 16


« Reply #9 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) 
ERROR: 1:183: 'rand' : function is not known
The error turned out to be in 3DKn-1.0.5.frag, and was caused because rand was being called with a float argument.  I added a function
Code:
float rand(float oo){
return rand(vec2(oo,oo));
}
and the code now runs error free.

Thanks again for your help, I can't wait to dive in now and start making thing happen.
« Last Edit: April 25, 2017, 02:36:50 PM by clacker, Reason: fixed spelling » Logged
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #10 on: April 25, 2017, 04:12:10 AM »

I have not seen this rand() error huh? but I'm glad you've found a fix cheesy
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  A Beer Cup
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
Sabine
Fractal Fertilizer
*****
Posts: 373



WWW
« Reply #11 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...
« Last Edit: April 25, 2017, 11:11:08 AM by Sabine » Logged

sabine62.deviantart.com
clacker
Forums Freshman
**
Posts: 16


« Reply #12 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?
Logged
Sabine
Fractal Fertilizer
*****
Posts: 373



WWW
« Reply #13 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.
« Last Edit: April 25, 2017, 04:08:11 PM by Sabine » Logged

sabine62.deviantart.com
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #14 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 huh?

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  A Beer Cup

edit: hmmm should look at why FragM isn't setting the #buffer to a default when it's not present... next update wink
« Last Edit: April 26, 2017, 02:53:46 AM by 3dickulus, Reason: thinking... » Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
Pages: [1] 2   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Posting Errors on the server? Discuss Fractal Forums Sockratease 4 1831 Last post February 22, 2008, 06:14:42 PM
by Sockratease
Help with errors.. Mandelbulb Implementation « 1 2 » eq 19 2878 Last post February 06, 2010, 02:20:28 AM
by David Makin
Older system compiler errors Mandelbulber kon16ov 4 2209 Last post October 16, 2010, 10:27:51 PM
by kon16ov
internal server errors Discuss Fractal Forums cKleinhuis 0 1248 Last post February 29, 2012, 03:01:19 PM
by cKleinhuis
Errors with ldbl64.dll Kalles Fraktaler Diddy 2 1928 Last post February 16, 2017, 10:01:24 PM
by TheRedshiftRider

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.193 seconds with 25 queries. (Pretty URLs adds 0.013s, 2q)