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

"Color Grading" filter does nothing and has no properties #510

Closed
fhars opened this issue Apr 11, 2021 · 18 comments · Fixed by #517
Closed

"Color Grading" filter does nothing and has no properties #510

fhars opened this issue Apr 11, 2021 · 18 comments · Fixed by #517
Assignees
Labels
bug Bugs such as crashing, freezing, broken functionality, etc.

Comments

@fhars
Copy link

fhars commented Apr 11, 2021

Description

The "Color Grading" filter does nothing and has no properties:
image

System Information

  • Software Version: OBS 26.1.1/ StreamFX ubuntu-20.04-0.9.3.0-2ecce522
  • Operating System: Ubuntu 20.10
  • Kernel Version: 5.8.0-48-lowlatency #54-Ubuntu
  • CPU: AMD Ryzen 7 3700X
  • GPU: Advanced Micro Devices, Inc. [AMD/ATI] Navi 14 [Radeon RX 5500/5500M / Pro 5500M] (rev c5)
  • RAM: 64G
@Xaymar
Copy link
Owner

Xaymar commented Apr 11, 2021

Please make sure to read the Installation Guide in its entirety, including the part of the required Software. Almost all installation issues can be fixed by installing the required software.

@fhars
Copy link
Author

fhars commented Apr 11, 2021

There is no required software section in the Installation Guide:

$ wget -O - https://github.com/xaymar/obs-streamfx/wiki/Installation | grep software-requirements
--2021-04-11 12:48:27--  https://github.com/xaymar/obs-streamfx/wiki/Installation
Resolving github.com (github.com)... 140.82.121.3
Connecting to github.com (github.com)|140.82.121.3|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘STDOUT’

-                                                        [ <=>                                                                                                                  ] 106,35K  --.-KB/s    in 0,05s   

2021-04-11 12:48:27 (2,17 MB/s) - written to stdout [108903]

and I have followed the rest of the instructions.

@Xaymar
Copy link
Owner

Xaymar commented Apr 11, 2021

Literally on the system requirements page:

Qt5 5.15 or newer
FFmpeg
OpenGL 4

Anyway, upload a log file.

@fhars
Copy link
Author

fhars commented Apr 11, 2021

Is the Qt5 dependency correct? Then how can you provide a precompiled package for Ubuntu 20.04, which comes with 5.12?

Anyway, this is what it says if I add a Color Grading filter:

error: Error compiling shader:
0:94(11): error: cannot access field `_m00' of non-structure / non-vector
0:94(11): error: type mismatch
0:94(2): error: operands to arithmetic operators must be numeric
0:94(31): error: cannot access field `_m01' of non-structure / non-vector
0:94(31): error: type mismatch
0:94(22): error: operands to arithmetic operators must be numeric
0:94(2): error: operands to arithmetic operators must be numeric
0:94(51): error: cannot access field `_m02' of non-structure / non-vector
0:94(51): error: type mismatch
0:94(42): error: operands to arithmetic operators must be numeric
0:94(2): error: operands to arithmetic operators must be numeric
0:93(9): error: cannot construct `vec4' from a non-numeric data type
0:93(9): error: operands to arithmetic operators must be numeric
0:93(2): error: `return' with wrong type error, in function `RGBtoYUV' returning vec4
0:110(2): error: C-style initialization requires the GL_ARB_shading_language_420pack extension
0:110(2): error: initializer of const variable `mYUV709n' must be a constant expression
0:125(11): error: no function with name 'log10'
0:125(11): error: operands to arithmetic operators must be numeric
0:125(10): error: operands to arithmetic operators must be numeric


error: device_pixelshader_create (GL) failed
error: Pass (0) <> missing pixel shader!
error: [StreamFX] <filter-color-grade> Loading effect '/home/hars/.config/obs-studio/plugins/StreamFX/data/effects/color-grade.effect' failed with error(s): Unknown error during effect compile.
error: [StreamFX] Unexpected exception in function '_create': Unknown error during effect compile..
error: Failed to create source 'Color Grading'!
info: User added filter 'Color Grading' (streamfx-filter-color-grade) to source 'C920'

My OpenGL seems to fit the requirements (4.60 for glsl should be higher than 4.20; or am I reading that wrong?):

OpenGL renderer string: Radeon RX 5500 XT (NAVI14, DRM 3.38.0, 5.8.0-48-lowlatency, LLVM 11.0.0)                                          
OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.2.6                                                                        
OpenGL core profile shading language version string: 4.60

@Xaymar
Copy link
Owner

Xaymar commented Apr 11, 2021

Looks like the issue is not StreamFX but the HLSL to GLSL translation layer that OBS uses.

@Xaymar
Copy link
Owner

Xaymar commented Apr 11, 2021

Is the Qt5 dependency correct? Then how can you provide a precompiled package for Ubuntu 20.04, which comes with 5.12?

It is indeed correct. The majority of the plugin relies on features added in or added after 5.12, so if Ubuntu is shipping unmodified packages, the plugin will not work as expected and have weird bugs.

@fhars
Copy link
Author

fhars commented Apr 11, 2021

I'll report back in two weeks after Ubuntu 21.04 is available with Qt 5.15.2 if this behaviour is indeed one of those cases.

@Xaymar
Copy link
Owner

Xaymar commented Apr 12, 2021

I've looked through all the shader errors provided, as far as I can tell, every single one of these should be solved by the Testing release 0.10.0 and later. The only one not fixed is log10, which is apparently not a function in GLSL. I will have to replace that construct with log(n)/log(10) instead.

@fhars
Copy link
Author

fhars commented Apr 12, 2021

It still complains about the C-style initialization of mYUV709n, and it doesn't like the

	u.rgb = pow(pow(u.rgb, pGamma.rgb), pGamma.a);

if I try to add it:

error: Error compiling shader:
0:36(10): error: no matching function for call to `pow(vec3, float)'; candidates are:
0:36(10): error:    float pow(float, float)
0:36(10): error:    vec2 pow(vec2, vec2)
0:36(10): error:    vec3 pow(vec3, vec3)
0:36(10): error:    vec4 pow(vec4, vec4)
0:110(2): error: C-style initialization requires the GL_ARB_shading_language_420pack extension
0:110(2): error: initializer of const variable `mYUV709n' must be a constant expression

@fhars
Copy link
Author

fhars commented Apr 12, 2021

By the way, the nested pows should be the same as

        u.rgb = pow(u.rgb, pGamma.a * pGamma.rgb);

which does not lead to an error for me, and if I change the mYUV709n-Initialization to mat3(...)-syntax, the filter works for me.

@alkaris2
Copy link

This issue is reproducible on Manjaro Linux. Pretty much any other effects except for certain few will not work on Linux because of shader compiler issues.

For example if try to use Hexagonize filter effect, that works as expected, but if you try to load up another filter like Drunk effect, it doesn't work, it gets the same shader compiler issues. Even some of the transition scene effects don't work fully or at all. Sliding bars use to work in previous OBS version, up until more recent builds, in its current state Sliding Bars just glitches uncontrollably.

@Xaymar Xaymar added issue:confirmed bug Bugs such as crashing, freezing, broken functionality, etc. and removed type:support labels Apr 14, 2021
@Xaymar Xaymar added this to the 0.10 milestone Apr 14, 2021
@Xaymar
Copy link
Owner

Xaymar commented Apr 14, 2021

For example if try to use Hexagonize filter effect, that works as expected, but if you try to load up another filter like Drunk effect, it doesn't work, it gets the same shader compiler issues. Even some of the transition scene effects don't work fully or at all. Sliding bars use to work in previous OBS version, up until more recent builds, in its current state Sliding Bars just glitches uncontrollably.

Shader filter/source/transition examples are unrelated to this issue. None of them are guaranteed to work across platforms.

@Xaymar
Copy link
Owner

Xaymar commented Apr 14, 2021

I was able to reproduce this issue in a VM, I'm unsure why my actual Ubuntu 20.04 machine would never encounter this. A fix is deployed to a branch and will be merged for the next 0.10.0 beta release.

@fhars
Copy link
Author

fhars commented Apr 14, 2021

Isn't the shader compiler part of the graphics driver? Maybe your actual system uses other drivers that the VM or my system.

@Xaymar
Copy link
Owner

Xaymar commented Apr 14, 2021

It is, yes. I know that on the actual machine I've been toying with kernels and mesa layers, so it might just be in a completely broken state now.

@Xaymar
Copy link
Owner

Xaymar commented Apr 14, 2021

I believe these should be fixed in the next upcoming release 0.10.0b3. If they are not, please report back and I'll re-open this.

@Xaymar
Copy link
Owner

Xaymar commented Apr 18, 2021

Version 0.10.0 Beta 3 is now out, please report back if the issue is fixed or not.

@SakiiCode
Copy link

No but got it working by replacing line 79 in color-grade.effect with

const float3x3 mYUV709n = float3x3( // Normalized 

Now it shows another error, but at least it works, even without the const keyword

error: Error compiling shader:
0:16(29): error: syntax error, unexpected NEW_IDENTIFIER


error: device_pixelshader_create (GL) failed
error: Pass (0) <> missing pixel shader!
error: [StreamFX] <gfx::lut::data> Loading LUT Producer effect failed: Unknown error during effect compile.
error: Error compiling shader:
0:19(30): error: syntax error, unexpected NEW_IDENTIFIER


error: device_pixelshader_create (GL) failed
error: Pass (0) <> missing pixel shader!
error: [StreamFX] <gfx::lut::data> Loading LUT Consumer effect failed: Unknown error during effect compile.
warning: [StreamFX] <filter::color-grade> Failed to initialize LUT rendering, falling back to direct rendering.
Unable to get LUT producer effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugs such as crashing, freezing, broken functionality, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants