Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
117 user(s) are online (106 user(s) are browsing Forums)

Members: 1
Guests: 116

joerg, more...

Support us!

Headlines

 
  Register To Post  

GLSL questions
Just can't stay away
Just can't stay away


See User information
Q1) is noise() function supported? Reference: https://www.khronos.org/registry/OpenG ... ages/gl4/html/noise.xhtml

I get a compilation error about "no matching overloaded function found".

Go to top
Re: GLSL questions
Not too shy to talk
Not too shy to talk


See User information
What you see there is ogles2's internal GLSL-to-SPIR-V compiler (glslangvalidator) complaining about the function not being supported. The reason for this problem is the #version you are using. Try e.g. ""#version 430" and the noiseX function calls will compile. Yes, all that #version hick-hack sucks hard with GLSL.

However, that still won't give you the desired result. I checked the source of the GLSL-to-SPIRV-compiler "glslangvalidator" (which is the reference GLSLcompiler) I use internally (and which is also used for my stand-alone build that ships with Nova) and found that it's handling it as a dummy.

So, what you get is effectively this
float a=/*noise1*/(b);
vec2 c=/*noise2*/(d);
etc.

As far as I can tell from a quick peak into the source even the latest glslangvalidator version doesn't emit anything real.
However, at least some years ago hardware support for the noise function was rare at best, I don't know if anybody implemented it at all, never used it.
The thing is that you can achieve the same if not better results if you implement your own noise function, usually consisting out of a noise-texture-lookup, thus being trivial to do and very fast.

glslangvalidator (or ogles2) could emit self-made noise functions, but a decent noise can be pretty costly, which is why they didn't do it at all, I suppose. So you end up with the above.

Go to top
Re: GLSL questions
Home away from home
Home away from home


See User information
@Capehill

The noise*() functions are now officially deprecated, and I've seen warnings to avoid them for years. As Daytona said, hardware support for the noise functions has been pretty rare.

I remember reading years ago that drivers could return a constant value (what GLSLangValidator does), and that would be spec compliant. And so, you cannot rely on this function.

Hans

Join Kea Campus' Amiga Corner and support Amiga content creation
https://keasigmadelta.com/ - see more of my work
Go to top
Re: GLSL questions
Just can't stay away
Just can't stay away


See User information
Thanks. Will try noise textures, then.

Q2) I tried to debug that "garbled display" issue which was reported on Mantis, using isinf() and isnan() functions but they were not working either. I don't remember the exact error right now.



Go to top
Re: GLSL questions
Not too shy to talk
Not too shy to talk


See User information
@Capehill
Quote:
isinf() and isnan()

Nova doesn't support those as of yet.

Go to top
Re: GLSL questions
Just can't stay away
Just can't stay away


See User information
@Daytona675x

Is #line directive supported? It compiles but doesn't seem to have any impact.



Go to top
Re: GLSL questions
Not too shy to talk
Not too shy to talk


See User information
@Capehill
I checked the GLSL compiler's preprocessor code, it's supported, so it should work. However I also found that the compiler's version which I'm using inside ogles2.lib apparently doesn't properly generate OpLine opcodes, so the ultimately reported line number is always 1...
This issue slipped through until now because due to Nova's formerly broken OpLine support it wasn't tested for real yet (I didn't receive the latest Nova yet which should be fixed accordingly) but only on my Windows test-environment where I used the latest official Khronos glslangvalidator to create test-SPIRVs.
Note: the reason why I'm using a rather old version of the GLSL compiler inside ogles2.lib is that later versions didn't support GLSL version < 1.4 anymore.

Anyway, I'll evaluate if I can update the compiler to a more recent version by now. If not I'll fix it to properly generate OpLine opcodes.

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project