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 Not Loading #25

Open
mansman12 opened this issue Nov 7, 2023 · 13 comments
Open

Shaders Not Loading #25

mansman12 opened this issue Nov 7, 2023 · 13 comments

Comments

@mansman12
Copy link

Following .shader/.effect files display an 'Error Unknown' on load.
This is using OBS Studio 29.1.3 (64 bit) with obs-shaderfilter 2.1.2 on Debian 12 with KDE X11.

  • alpha_border.shader
  • ascii.shader
  • aspect_ratio.shader (This one has a slightly different error: 'Error (null) (50,28): Expected 'type'')
  • box-blur.shader
  • circle-mask-filter.shader
  • cut_rect_per_corner.shader
  • darken.shader
  • dead-pixel-fixer.shader
  • embers.effect
  • gaussian-blur-advanced.shader
  • gaussian-blur-simple.shader
  • gaussian-blur.effect
  • gaussian-example.effect
  • gb-camera.shader
  • heat-wave-simple.shader
  • hexagon.shader
  • invert-luma.shader
  • pie-chart.shader
  • rain-window.shader
  • rotatoe.effect
  • rounded_rect_per_corner.shader
  • rounded_rect_per_side.shader
  • rounded_rect2.shader
  • rounded_stroke_gradient.shader
  • rounded_stroke.shader
  • simplex_noise.shader
  • Swirl.shader
  • twist.shader
  • VHS.shader
  • voronoi-pixelation.shader

Also I've encountered a strange bug (?) with the Add.shader, it functions correctly when using a pure black image to add as a background to text (say) but if using a grey image (262626 hex code) it acts as a transparent highlight over the text.

@exeldro
Copy link
Owner

exeldro commented Nov 7, 2023

All shaders are made and tested on directx and might not work on opengl. The error 'Error Unknown' should give more information from OBS 30 and up.
In some cases it might be possible to change the shader in a way it will work with both directx and opengl. In other cases an opengl specific version might be required.

@exeldro
Copy link
Owner

exeldro commented Nov 8, 2023

Working on getting more shaders working in opengl. I made a fix in master, you should be able to get version I am working on here:
https://github.com/exeldro/obs-shaderfilter/actions/runs/6804608381

I expect to have all shaders I can fix done by the end of this week

@mansman12
Copy link
Author

That makes sense for the opengl vs directx, I'll take a look at the fix and let you know which ones are working and which ones are broken.

@mansman12
Copy link
Author

mansman12 commented Nov 9, 2023

I've retested the shaders above with the fix with the following results:

Fixed

  • alpha_border.shader
  • ascii.shader
  • aspect_ratio.shader
  • box-blur.shader
  • circle-mask-filter.shader
  • darken.shader
  • dead-pixel-fixer.shader
  • gaussian-blur-advanced.shader
  • gaussian-blur-simple.shader
  • gaussian-blur.shader
  • rounded_rect_per_corner.shader
  • rounded_stroke.shader

Remaining

  • embers.effect
  • gaussian-example.effect
  • gb-camera.shader
  • heat-wave-simpler.shader
  • hexagon.shader
  • rotatoe.effect
  • rounded_rect_per_side.shader
  • rounded_rect2.shader
  • rounded_stroke_gradient.shader
  • simplex_noise.shader
  • Swirl.shader
  • twist.shader
  • VHS.shader
  • voronoi-pixelation.shader

I have not yet backtested every other shader to check nothing else has broken though I don't imagine that would be the case.

@exeldro
Copy link
Owner

exeldro commented Nov 9, 2023

Thank you for all the testing, I fixed a couple more now
https://github.com/exeldro/obs-shaderfilter/actions/runs/6811121151
The only one not working yet on my system is gaussian-example.effect

@mansman12
Copy link
Author

No worries, thanks for the update. I've tested this one against the ones remaining and have the following results on my system:

Fixed

  • gb-camera.shader
  • heat-wave-simpler.shader
  • hexagon.shader
  • rotatoe.effect
  • rounded_rect2.shader
  • Swirl.shader
  • VHS.shader
  • voronoi-pixelation.shader

Remaining

  • embers.effect
  • gaussian-example.effect
  • rounded_rect_per_side.shader
  • rounded_stroke_gradient.shader
  • simplex_noise.shader
  • twist.shader

@exeldro
Copy link
Owner

exeldro commented Nov 9, 2023

fixed simplex_noise.shader
https://github.com/exeldro/obs-shaderfilter/actions/runs/6815991893

can you provide obs logs for the loading of the remaining shaders except gaussian-example.effect?

@mansman12
Copy link
Author

obs log below for the following shaders (in this order):

  • embers.effect
  • rounded_rect_per_side.shader
  • rounded_stroke_gradient.shader
  • twist.shader
10:41:50.723: 0:47(27): error: no function with name 'float2x2'
10:41:50.723: 0:47(20): error: operands to arithmetic operators must be numeric
10:41:50.723: 0:47(15): error: no matching function for call to `sin(error)'; candidates are:
10:41:50.723: 0:47(15): error:    float sin(float)
10:41:50.723: 0:47(15): error:    vec2 sin(vec2)
10:41:50.723: 0:47(15): error:    vec3 sin(vec3)
10:41:50.723: 0:47(15): error:    vec4 sin(vec4)
10:41:50.723: 0:47(15): error: operands to arithmetic operators must be numeric
10:41:50.723: 0:47(9): error: no matching function for call to `fract(error)'; candidates are:
10:41:50.723: 0:47(9): error:    float fract(float)
10:41:50.723: 0:47(9): error:    vec2 fract(vec2)
10:41:50.723: 0:47(9): error:    vec3 fract(vec3)
10:41:50.723: 0:47(9): error:    vec4 fract(vec4)
10:41:50.723: 0:47(2): error: `return' with wrong type error, in function `hash2_2' returning vec2
10:41:50.723: 0:127(14): error: no function with name 'float2x2'
10:41:50.723: 0:127(12): error: operands to arithmetic operators must be numeric
10:41:50.723: 0:127(11): error: operands to arithmetic operators must be numeric
10:41:50.723: 0:136(12): error: no function with name 'float2x2'
10:41:50.723: 0:136(10): error: operands to arithmetic operators must be numeric
10:41:50.723: 0:136(2): error: `return' with wrong type error, in function `rotate' returning vec2
10:41:50.723: 
10:41:50.723: 
10:41:50.723: device_pixelshader_create (GL) failed
10:41:50.723: Pass (0) <> missing pixel shader!
10:41:50.723: [obs-shaderfilter] Unable to create effect. Errors returned from parser:
10:41:50.723: (None)
10:42:01.413: Error compiling shader:
10:42:01.413: 0:46(7): error: illegal use of reserved word `output'
10:42:01.413: 0:46(7): error: syntax error, unexpected ERROR_TOK, expecting ',' or ';'
10:42:01.413: 
10:42:01.413: 
10:42:01.414: device_pixelshader_create (GL) failed
10:42:01.414: Pass (0) <> missing pixel shader!
10:42:01.414: [obs-shaderfilter] Unable to create effect. Errors returned from parser:
10:42:01.414: (None)
10:42:08.253: Error compiling shader:
10:42:08.253: 0:79(7): error: illegal use of reserved word `output'
10:42:08.253: 0:79(7): error: syntax error, unexpected ERROR_TOK, expecting ',' or ';'
10:42:08.253: 
10:42:08.253: 
10:42:08.253: device_pixelshader_create (GL) failed
10:42:08.253: Pass (0) <> missing pixel shader!
10:42:08.253: [obs-shaderfilter] Unable to create effect. Errors returned from parser:
10:42:08.253: (None)
10:42:18.961: Error compiling shader:
10:42:18.961: 0:38(1): error: syntax error, unexpected NEW_IDENTIFIER, expecting end of file
10:42:18.961: 
10:42:18.961: 
10:42:18.961: device_pixelshader_create (GL) failed
10:42:18.961: Pass (0) <> missing pixel shader!
10:42:18.961: [obs-shaderfilter] Unable to create effect. Errors returned from parser:
10:42:18.961: (None)

@exeldro
Copy link
Owner

exeldro commented Nov 10, 2023

the rounded ones I fixed now, working on the embers and twist.
https://github.com/exeldro/obs-shaderfilter/actions/runs/6824405379
an attempt to fix embers and twist:
https://github.com/exeldro/obs-shaderfilter/actions/runs/6824776903

@mansman12
Copy link
Author

mansman12 commented Nov 10, 2023

Can confirm the rounded ones are fixed in both runs. Unfortunately embers and twist are still giving errors on my side (in both runs), output log below (embers, then twist):

13:41:01.414: [obs-shaderfilter] Unable to create effect. Errors returned from parser:
13:41:01.414: (None)
13:41:06.830: Error compiling shader:
13:41:06.830: 0:47(19): error: no function with name 'float2x2'
13:41:06.830: 0:47(12): error: operands to arithmetic operators must be numeric
13:41:06.830: 0:48(19): warning: `y' used uninitialized
13:41:06.830: 0:128(24): error: no function with name 'float2x2'
13:41:06.830: 0:128(12): error: operands to arithmetic operators must be numeric
13:41:06.830: 0:128(11): error: operands to arithmetic operators must be numeric
13:41:06.830: 0:137(22): error: no function with name 'float2x2'
13:41:06.830: 0:137(10): error: operands to arithmetic operators must be numeric
13:41:06.830: 0:137(2): error: `return' with wrong type error, in function `rotate' returning vec2
13:41:06.830: 
13:41:06.830: 
13:41:06.830: device_pixelshader_create (GL) failed
13:41:06.830: Pass (0) <> missing pixel shader!
13:41:06.830: [obs-shaderfilter] Unable to create effect. Errors returned from parser:
13:41:06.830: (None)
13:41:13.117: Error compiling shader:
13:41:13.117: 0:38(1): error: syntax error, unexpected NEW_IDENTIFIER, expecting end of file
13:41:13.117: 
13:41:13.117: 
13:41:13.117: device_pixelshader_create (GL) failed
13:41:13.117: Pass (0) <> missing pixel shader!
13:41:13.117: [obs-shaderfilter] Unable to create effect. Errors returned from parser:
13:41:13.117: (None)

@exeldro
Copy link
Owner

exeldro commented Nov 10, 2023

one more try for today, shooting in the dark here.
https://github.com/exeldro/obs-shaderfilter/actions/runs/6826553988

@mansman12
Copy link
Author

Nice, can confirm embers and twist are working with this update. Good job! I think the only things left are the gaussian-example and the issue with the add.shader vs certain colours.

@micsthepick
Copy link

yes, for me I get the following error for gaussian-example.effect: "Error (null) (185, 1): Error creating shader: 0(63) " error C1503: undefined variable "outputval", Would like to know how to make multipass effects without having the separate passes get clipped to the range [0, 1]^4.

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

3 participants