Fractal Software > Programming

 WebGL Fractal Program

(1/2) > >>

kosalos:
https://openprocessing.org/sketch/1263119

Wrote my first WebGL program, using OpenProcessing.  :rock:
Don't have a Linux machine to test, but it works well on Windows and Mac.
Makes pretty good use of the GPU on both machines.
Not quite as fast as native code (DirectX or Metal),  but very usable.
I added a 'fast mode' so that parameter changes are always very responsive.

I'd like to hear comments and suggestions.
Thanks
More to come

Linkback: https://fractalforums.org/index.php?topic=4408.0

C0ryMcG:
This is something I've been meaning to try, but haven't had the motivation yet.

I am a person with a linux machine, but it didn't work for me. Here is the error and details it threw, if that's helpful:

--- Code: ---TypeError: this.curFillShader.attributes.aNormal is undefined

    https://cdn.jsdelivr.net/npm/p5@0.5.16/lib/p5.min.js, line 37
    https://cdn.jsdelivr.net/npm/p5@0.5.16/lib/p5.min.js, line 38
    https://cdn.jsdelivr.net/npm/p5@0.5.16/lib/p5.min.js, line 32
    main, line 302
    https://cdn.jsdelivr.net/npm/p5@0.5.16/lib/p5.min.js, line 33
    https://cdn.jsdelivr.net/npm/p5@0.5.16/lib/p5.min.js, line 32
    https://cdn.jsdelivr.net/npm/p5@0.5.16/lib/p5.min.js, line 32
    https://cdn.jsdelivr.net/npm/p5@0.5.16/lib/p5.min.js, line 32
    https://cdn.jsdelivr.net/npm/p5@0.5.16/lib/p5.min.js, line 32

--- End code ---

kosalos:
Sorry I can't help.
Would really need a Linux machine to try experiments.
Other programs have the same problem:   https://github.com/processing/p5.js/issues/2466
In my app:  main, line 302  is where a rectangle is drawn, which kicks off the shader code.
The crash in within one of their libraries.

If you could post any WebGL program that works on your machine,
we can hopefully find a way around the problem.
thanks

3DickUlus:
I think there is a bit more going on than problems with their library but that probably compounds the issue.


--- Code: ---This page uses the non standard property “zoom”. Consider using calc() in the relevant property values, or using “transform” along with “transform-origin: 0 0”. 1263119
<source> element has no “src” attribute. Media resource load failed. 1263119
All candidate resources failed to load. Media load paused. 1263119
unreachable code after return statement 2 sketch_view.js:2962:1
Feature Policy: Skipping unsupported feature name “midi”. jquery-1.11.1.min.js:3:19207
Feature Policy: Skipping unsupported feature name “encrypted-media”. jquery-1.11.1.min.js:3:19207
Feature Policy: Skipping unsupported feature name “accelerometer”. jquery-1.11.1.min.js:3:19207
Feature Policy: Skipping unsupported feature name “magnetometer”. jquery-1.11.1.min.js:3:19207
Feature Policy: Skipping unsupported feature name “gyroscope”. jquery-1.11.1.min.js:3:19207
Feature Policy: Skipping unsupported feature name “autoplay”. jquery-1.11.1.min.js:3:19207
Feature Policy: Skipping unsupported feature name “midi”. jquery-1.11.1.min.js:4:12568
Feature Policy: Skipping unsupported feature name “encrypted-media”. jquery-1.11.1.min.js:4:12568
Feature Policy: Skipping unsupported feature name “accelerometer”. jquery-1.11.1.min.js:4:12568
Feature Policy: Skipping unsupported feature name “magnetometer”. jquery-1.11.1.min.js:4:12568
Feature Policy: Skipping unsupported feature name “gyroscope”. jquery-1.11.1.min.js:4:12568
Feature Policy: Skipping unsupported feature name “autoplay”. jquery-1.11.1.min.js:4:12568
Feature Policy: Skipping unsupported feature name “midi”. jquery-1.11.1.min.js:3:20617
Feature Policy: Skipping unsupported feature name “encrypted-media”. jquery-1.11.1.min.js:3:20617
Feature Policy: Skipping unsupported feature name “accelerometer”. jquery-1.11.1.min.js:3:20617
Feature Policy: Skipping unsupported feature name “magnetometer”. jquery-1.11.1.min.js:3:20617
Feature Policy: Skipping unsupported feature name “gyroscope”. jquery-1.11.1.min.js:3:20617
Feature Policy: Skipping unsupported feature name “autoplay”. jquery-1.11.1.min.js:3:20617
Hi there! Feel free to use this console for native console features. To interact directly with your sketch, select "sketchIframeXXXXX" from the context dropdown above. sketch_view.js:319:11
But, also be careful with what you post here. Do not post any code that you do not fully understand, as it can allow other users to access your account. sketch_view.js:320:11
Use of the orientation sensor is deprecated. p5.min.js:32:18374
Use of the motion sensor is deprecated. p5.min.js:32:18374
p5.RendererGL: enabled webgl context sketch_preview.js:128:15
Uncaught TypeError: this.curFillShader.attributes.aNormal is undefined
    createBuffers https://cdn.jsdelivr.net/npm/p5@0.5.16/lib/p5.min.js:37
    rect https://cdn.jsdelivr.net/npm/p5@0.5.16/lib/p5.min.js:38
    rect https://cdn.jsdelivr.net/npm/p5@0.5.16/lib/p5.min.js:32
    draw blob:https://preview.openprocessing.org/89b8a066-456d-481c-9414-b4bf4e96f098:302
    redraw https://cdn.jsdelivr.net/npm/p5@0.5.16/lib/p5.min.js:33
    _draw https://cdn.jsdelivr.net/npm/p5@0.5.16/lib/p5.min.js:32
    _start https://cdn.jsdelivr.net/npm/p5@0.5.16/lib/p5.min.js:32
    e https://cdn.jsdelivr.net/npm/p5@0.5.16/lib/p5.min.js:32
    e https://cdn.jsdelivr.net/npm/p5@0.5.16/lib/p5.min.js:32
p5.min.js:37:3960
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://sentry.io/api/1368154/envelope/?sentry_key=c9e1e20b5bac4b559906be31565bba72&sentry_version=7. (Reason: CORS request did not succeed).

--- End code ---

edit if you're running an ad-blocker or anti-tracker plugin in your browser then it's probably blocking https://sentry.io/ and possibly other stuff like the google-analytics.js code.
Who knows... it loads a LOT (many many Ks) of code from cloud services... a debugging nightmare... but I could be wrong ??? it might be something really simple like turn off your ad-blocker and anti-tracker ???

kosalos:
Sorry guys, don't know what to say or do.
I've tested it on the Mac using Firefox and Safari,  and Firefox on Windows 10.
Never used Linux, but it seems I would need the exact version of Linux as you have to do experiments.
You have all the source code. You'll notice I tried to make it as small as possible.
All the rest is in the OpenProcessing rendition of WebGL.
From 3Dickulus' crash dump:  the app does not use zoom, midi, accelerometer, magnet0meter, gyroscope or autoplay.

Tell me how I can help.

------------------------
another idea:
Please see if this app runs for you:  https://openprocessing.org/sketch/498833
This is what I originally forked to learn how to use WebGL in OpenProcessing.

Navigation

[0] Message Index

[#] Next page

Go to full version
Powered by SMFPacks Rates (Facepunch) Mod
Powered by SMFPacks SEO Pro Mod | Sitemap
Powered by Advanced Topic Prefix Pro
Powered by SMFPacks Advanced Attachments Uploader Mod