No matching overloaded function found

contains the latest version of our visualizer plugin (replacing Chrome)

Return to “ZGameEditor Visualizer forum”

[You can only see part of this thread as you are not logged in to the forums]
Wontolla
Mon Jan 22, 2024 5:18 pm

x

No matching overloaded function found

Hi,
I've started trying to develop effects for ZGE, and some basic built-in functions don't seem to be showing up.
I'm making a basic noise plugin. Here's my FragmentShaderSource code:

Code: Select all

uniform sampler2D tex1;

uniform float alpha;
uniform float sat;
uniform vec2 res,iViewport;

//-----------------------------

float slide (float a, float b, float c) {
  return (a*(1-c))+(b*c);
}

void main()
{
  vec2 uv = (gl_FragCoord.xy-iViewport.xy)/res.xy;
  float red = rnd();
  float green = rnd();
  float blue = rnd();
    vec4 col = vec4(red, slide(red, green, sat), slide(red, blue, sat), 1.);

    gl_FragColor = mix(col,texture2D(tex1,uv),alpha);
}
Running it in the IDE or the actual visualizer returns this:

Code: Select all

Error in Fragment shader compilation (CanvasShader)
ERROR: 0:18: 'rnd' : no matching overloaded function found 
ERROR: 0:18: '' : compilation terminated 
ERROR: 2 compilation errors.  No code generated.
rnd() is definitely a built-in function according to the documentation. What am I missing?

Kjell
Mon Jan 22, 2024 7:00 pm

x

Re: No matching overloaded function found

Wontolla wrote: ↑Mon Jan 22, 2024 5:18 pmrnd() ...

Wontolla
Mon Jan 22, 2024 10:13 pm

x

Re: No matching overloaded function found

Ah. I noticed some other effects (ie Youlean Ha...

Kjell
Mon Jan 22, 2024 10:34 pm

x

Re: No matching overloaded function found

Wontolla wrote: ↑Mon Jan 22, 2024 10:13 pmI not...

Wontolla
Mon Jan 22, 2024 11:14 pm

x

Re: No matching overloaded function found

Thanks. That sucks, but I was able to find a ps...


Return to “ZGameEditor Visualizer forum”