That's good francoe,
"strdup" is used in the FFGL SDK and gives a warning but should not affect things. If it is stopping you I might be able to track it down. Yes "Stringify" has limitations, but the alternative is to have every line in quotes which is not very practical. Look for anything with with a "#" such as #define. Usually you can get around these things in other ways.
FreeframeGL ShaderLoader
Re: FreeframeGL ShaderLoader
Yes, I've spended last night playing with. Replaced strdup by _strdup, and sprintf by sprintf_s anywhere to stop the warnings. Right now I don't know what's allowed or what's not.
I have some shaders compiled succesfully, taking in consideration I can't write a shader from scratch!
Sandbox use to works better than Shadertoy for me, and some pretty simple shaders are not working, and don't know why.
About stringify the code, now I need to learn how modify it to avoid all the #define stuff. Another thing is not clear to me is where avoid commas, cause they are necesary to certain things, and looking to the included examples I see there are some (the iñigo example has it).
Anyway, pretty much fun!
I have some shaders compiled succesfully, taking in consideration I can't write a shader from scratch!
Sandbox use to works better than Shadertoy for me, and some pretty simple shaders are not working, and don't know why.
About stringify the code, now I need to learn how modify it to avoid all the #define stuff. Another thing is not clear to me is where avoid commas, cause they are necesary to certain things, and looking to the included examples I see there are some (the iñigo example has it).
Anyway, pretty much fun!
Re: FreeframeGL ShaderLoader
Using "sprintf_s" and "strdup_s" is the way it should be done now, so that's all good. But the older ones still can be used.
The # character is the main problem using stringify. Usually you can use variables instead of #defines. I might remove the remark about commas because clearly it is working with the examples in the source code. I am looking at this in a bit more detail. I thought these limitations would sink the whole thing, but it seems that it works in most cases.
Cube textures and "textureCube" are not supported. Also there cannot be more than two input textures. I have it ready for four, but freeframe host support is the problem and I am looking at ways around this.
Also some shaders don't apply any effect to the texture itself but need a noise texture image to create noise or random variables.
GLSL Sandbox has the concept of "Surface position" which uses a varying uniform from the Vertex shader and that is not supported. But as you say some still don't work. I will look at them if you like. No guarantees, but it might reveal problems that can be fixed. Send via personal message.
The # character is the main problem using stringify. Usually you can use variables instead of #defines. I might remove the remark about commas because clearly it is working with the examples in the source code. I am looking at this in a bit more detail. I thought these limitations would sink the whole thing, but it seems that it works in most cases.
Cube textures and "textureCube" are not supported. Also there cannot be more than two input textures. I have it ready for four, but freeframe host support is the problem and I am looking at ways around this.
Also some shaders don't apply any effect to the texture itself but need a noise texture image to create noise or random variables.
GLSL Sandbox has the concept of "Surface position" which uses a varying uniform from the Vertex shader and that is not supported. But as you say some still don't work. I will look at them if you like. No guarantees, but it might reveal problems that can be fixed. Send via personal message.
Re: FreeframeGL ShaderLoader
You can manually set the resolution in the shaders.francoe wrote:Drazkers, stick it to the comp resolution as only option is not ideal either.
Sometimes you can play dxv clips at high fps on a 1080 comp, but have no power to move a shader.
Don't need to set up 'iresolutions' if shaderLoader take the comp res at default. But why not have the ability of change it when you needs?
I've been having fun creating a whole set based around remixed shaders. Its interesting to combine shaders and have various 3d elements hooked up to BPM inputs. Thanks for the FFGL kit, i'm gonna start looking into this as its crazy useful for being able to add between decks.leadedge wrote:Using "sprintf_s" and "strdup_s" is the way it should be done now, so that's all good. But the older ones still can be used.
The # character is the main problem using stringify. Usually you can use variables instead of #defines. I might remove the remark about commas because clearly it is working with the examples in the source code. I am looking at this in a bit more detail. I thought these limitations would sink the whole thing, but it seems that it works in most cases.
Cube textures and "textureCube" are not supported. Also there cannot be more than two input textures. I have it ready for four, but freeframe host support is the problem and I am looking at ways around this.
Also some shaders don't apply any effect to the texture itself but need a noise texture image to create noise or random variables.
GLSL Sandbox has the concept of "Surface position" which uses a varying uniform from the Vertex shader and that is not supported. But as you say some still don't work. I will look at them if you like. No guarantees, but it might reveal problems that can be fixed. Send via personal message.
Re: FreeframeGL ShaderLoader
Drakzers, you're right. I missed that 'iResolution' refers to a shader value, cause I'm new on this.
Now with two days of learning some basics I undestand you
Lynn, is all good. I've replaced the defines by variables, and found iMouse and inputColour (now you can laugh of me!) Needs more? In the same trip I spended a few hours trying to set up a tex0 on iChannel0, until undestand that's working out of the box. Now I need to figure out how to feed a noise to the second texture.
The true is I'm really happy with this. Years ago I was playing with the bigfug stuff trying to make a ffgl from a simple sharpener shader with no success. Now I can do it in a sec!
Now with two days of learning some basics I undestand you
Lynn, is all good. I've replaced the defines by variables, and found iMouse and inputColour (now you can laugh of me!) Needs more? In the same trip I spended a few hours trying to set up a tex0 on iChannel0, until undestand that's working out of the box. Now I need to figure out how to feed a noise to the second texture.
The true is I'm really happy with this. Years ago I was playing with the bigfug stuff trying to make a ffgl from a simple sharpener shader with no success. Now I can do it in a sec!
Re: FreeframeGL ShaderLoader
If you find out how to connect that second texture, please let me know.
I would also like to support four input textures to be fully compatible with ShaderToy, but I am not sure whether Resolume will do this.
I would also like to support four input textures to be fully compatible with ShaderToy, but I am not sure whether Resolume will do this.
Re: FreeframeGL ShaderLoader
It's great to see people start their journey into shader programming and generative visuals. Lynn, thank you for your amazing work, and also thank you for your excellent support on this thread and over on the Spout forums.
Re: FreeframeGL ShaderLoader
Thanks Joris. No problems at all and it is very rewarding to create something that people can use.
Could you please help Francoe with how to get a second texture input to the plugin. I have seen an explanation of yours somewhere before but could not understand how to do it. Maybe a step-by-step?
I also assume there is no way that Resolume can provide 4 textures to the plugin. My concern is if I allow 4 inputs that this might cause problems.
Could you please help Francoe with how to get a second texture input to the plugin. I have seen an explanation of yours somewhere before but could not understand how to do it. Maybe a step-by-step?
I also assume there is no way that Resolume can provide 4 textures to the plugin. My concern is if I allow 4 inputs that this might cause problems.
Re: FreeframeGL ShaderLoader
The only way to get two textures from Resolume is by using the plugin as a blend mode, where the layer(s) underneath would be the second texture.
I don't think allowing more texture inputs will be problematic, it's just that Resolume has no interface for supplying more than the texture of the clip the effect is applied on. This is something that we'd first need to resolve on the host side.
I don't think allowing more texture inputs will be problematic, it's just that Resolume has no interface for supplying more than the texture of the clip the effect is applied on. This is something that we'd first need to resolve on the host side.
Re: FreeframeGL ShaderLoader
Hi Joris,
I must be missing something basic. How do I add the ShaderLoader plugin as a blend mode?
Edit ..
Discovered that the plugin has to have a minimum of 2 inputs. Difficult here because most shaders don't need one and it is set to zero - logic problem with Freeframe. Looking at how I can work around it.
Also - say we have 2 layers 1 and 2 and we have an image in a cell in both layers. In layer 2 we add the ShaderLoader plugin as a blend mode. In layer 1 we set blend mode to Add. What I find is that the shader sees the image in Layer2 as Texture 0 and the image in Layer 1 as Texture 1. Is that how it should be?
And I can't seem to access the plugin controls if it is added as a blend mode. Another basic thing I am missing?
I must be missing something basic. How do I add the ShaderLoader plugin as a blend mode?
Edit ..
Discovered that the plugin has to have a minimum of 2 inputs. Difficult here because most shaders don't need one and it is set to zero - logic problem with Freeframe. Looking at how I can work around it.
Also - say we have 2 layers 1 and 2 and we have an image in a cell in both layers. In layer 2 we add the ShaderLoader plugin as a blend mode. In layer 1 we set blend mode to Add. What I find is that the shader sees the image in Layer2 as Texture 0 and the image in Layer 1 as Texture 1. Is that how it should be?
And I can't seem to access the plugin controls if it is added as a blend mode. Another basic thing I am missing?