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

Shaders do not compile on Linux #1

Open
loooph opened this issue Sep 3, 2020 · 4 comments
Open

Shaders do not compile on Linux #1

loooph opened this issue Sep 3, 2020 · 4 comments

Comments

@loooph
Copy link
Contributor

loooph commented Sep 3, 2020

There appears to be some errors in the shader code when trying to use it on GNU/Linux,
e.g. NESTrisSharpener.shader

0(76) : error C7623: implicit narrowing of type from "vec2" to "float"
0(175) : error C7549: OpenGL does not allow C style initializers
0(242) : error C7011: implicit cast from "float" to "vec2"
0(428) : error C1021: operands to "%" must be integral
0(429) : error C1021: operands to "%" must be integral
0(430) : error C7011: implicit cast from "float" to "vec2"
0(528) : error C7011: implicit cast from "float" to "vec2"
0(589) : error C7011: implicit cast from "float" to "int"

I already have a working patch for NESTris-Stencil.shader and will try to make a PR for all of them.

@alex-ong
Copy link
Owner

alex-ong commented Sep 3, 2020

Very exciting; did you end up compiling OBS-ShaderFilter for linux? Otherwise, how did you apply the shader?

@loooph
Copy link
Contributor Author

loooph commented Sep 4, 2020

Yes, i had to compile obs-shaderfilter.
After struggling a bit with the cmake i just built it manually using this single command:

gcc -I /usr/include/obs -shared -fpic -lobs -o obs-shaderfilter.so src/*.c

Also, I have submitted an AUR package obs-shaderfilter-git to ease installation for archlinux based distros.

@alex-ong
Copy link
Owner

alex-ong commented Sep 4, 2020

That's actually brilliant because i run manjaro (it's arch based) for memes and the reason i don't stream tetris on it is because sharpener no worky

@alex-ong
Copy link
Owner

This took 3 months, but looks like your change for arrays doesn't work in Windows, so nestris.shader and nestris-basic.shader don't compile.

I've put them in folder called OpenGL if that's appropriate

OpenGL only

    const float2 test[28] = float2[28](

Dx only

    const float2 test[28] = {

Linux users can just choose the OpenGL/shadername ones and it should be fine.

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

No branches or pull requests

2 participants