Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Glsl emscripten #92

Merged
merged 8 commits into from
May 11, 2019
Merged

Conversation

axe312ger
Copy link
Contributor

  • add glm as dependency so users don't have to grab it on their own
  • add some finding i had on another machien to the readme to help others
  • fix makefile with our latest findings

### General

Want to restart the process after pulling or changing config?
* `rm src/projectM-emscripten/projectW*`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be a clean target

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any way to ensure this like a cleanup script?

# Easy way:
# TLDR:
* `./autogen.sh`
* `emconfigure ./configure --enable-emscripten --enable-gles --enable-sdl`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i tried making it so all you need is --enable-emscripten now and it infers the others

# TLDR:
* `./autogen.sh`
* `emconfigure ./configure --enable-emscripten --enable-gles --enable-sdl`
* `emmake make -j4 -lvendor`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is -lvendor needed? that should be in CPPFLAGS or whatever.. -I

@revmischa
Copy link
Collaborator

@deltaoscarmike chill?

@deltaoscarmike
Copy link
Collaborator

deltaoscarmike commented Aug 28, 2018

As is, it doesn't work:

  • FF displays the page but PM doesn't start (output log is empty) and finally it freeze
  • Chrome displays the page, but PM doesn't start (output log is empty)

You've got it working ? What is the status of this branch ?

@revmischa
Copy link
Collaborator

No, I never got it to fully run. But it's not a regression either; emscripten doesn't work in glsl now. It just gets a little closer to maybe working now
@axe312ger do you know what the current problem is? is it still GLSL versions?

@deltaoscarmike
Copy link
Collaborator

Oops, i've made a mistake while trying to push a commit on this branch, please delete branch PR92.
Oth, i've got it working (sort of), try this patch

@axe312ger
Copy link
Contributor Author

Thank you, I gonna have a look!

@axe312ger
Copy link
Contributor Author

Thats my Chrome console output. (It freezes, make sure to open the console first, then navigate to the server running emscripten

screen shot 2018-08-28 at 13 39 26

I guess the shaders are still broken / using the wrong types. I tried to fix this 2 weeks ago but no, no luck. (Well fixing as of randomly changing values that seem to be related and 🤞 )

Failed to compile shader 'Fragment: blur1'. Error: ERROR: 0:39: 'assign' : cannot convert from 'const int' to 'mediump float'
Failed to compile shader 'Fragment: blur2'. Error: ERROR: 0:30: '-' : wrong operand types - no operation '-' exists that takes a left-hand operand of type 'const int' and a right operand of type 'mediump float' (or there is no acceptable conversion)

I wonder how to add presets to the wasm as well:

[PresetLoader] ENOENT error. The path "/presets" probably does not exist. "man open" for more info.

Thanks for your help 👋

@deltaoscarmike
Copy link
Collaborator

WebGL is rather strict concerning implicit casts, this patch will fix blur shaders, re-enable WASM and print root content of the virtual filesystem.
For the preset directory issue, i think this link could be useful on how to embed presets.
My priority is to get a rendering closer to Milkdrop/winamp and that's lot of work 🔧
Good luck

@axe312ger
Copy link
Contributor Author

It works now!!! Thanks so much @deltaoscarmike

screen shot 2018-08-29 at 11 25 12

@axe312ger
Copy link
Contributor Author

I fixed the merge conflicts :)

@axe312ger
Copy link
Contributor Author

Still need to read into the file system api for emscripten to get the presets running

revmischa added a commit that referenced this pull request Sep 8, 2018
Re-enable shaders on modern platforms by transpiling HLSL to GLSL on the fly.
Better GLES support.
Running successfully on embedded systems with GLES and shaders. Compiles and almost runs with emscripten now (#92).
Mega props 👏 => @deltaoscarmike <= 👏
@revmischa revmischa changed the base branch from glsl to master September 8, 2018 08:09
@revmischa revmischa merged commit 4fd40d0 into projectM-visualizer:master May 11, 2019
revmischa added a commit that referenced this pull request Nov 16, 2019
Re-enable shaders on modern platforms by transpiling HLSL to GLSL on the fly.
Better GLES support.
Running successfully on embedded systems with GLES and shaders. Compiles and almost runs with emscripten now (#92).
Mega props 👏 => @deltaoscarmike <= 👏
revmischa pushed a commit that referenced this pull request Nov 16, 2019
* add glm lib in vendor folder

* fix makefile

* add more help and context to emscripten readme

* add correct output parameter to emcc

* add how to restart the process to the readme

* simplify emscripten compilation

* apply patch

* fix blur shaders to work with WebGL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants