Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
84 user(s) are online (69 user(s) are browsing Forums)

Members: 0
Guests: 84

more...

Support us!

Headlines




« 1 2 3 4 (5) 6 »


Re: The OpenGL ES 2.0 thread
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 6819
@Capehill, Daniel
Yeah seems some mess: in howto, the say "float", in the shader inputs its all ints.

@Capehill
Quote:

if (iFrame > 5.0)

Does it help?


Yeah, it then compiles, but just fail because of missing OpImage/OpmageFetch instructions from Nova, I reported that some time ago: http://www.amiga.org/developer/bugreports/view.php?id=620

Quote:

Same thing for BufferB/line 103:

if (iFrame <= 4.0 ...


Yeah, compile too, but can't make that multipass one to work as expected, messed with all possible channels/buffers and co :)

_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: The OpenGL ES 2.0 thread
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 6819
@Petrol
Btw, about that on imac's safari:

Quote:

int nextIdx = min(prevIdx+1, 3);
'min' : no matching overloaded function found
'=' : cannot convert from 'const mediump float' to 'highp int'


I found lately about 30-40 shaders which fail on our setups as well, with the same "min': no matching overloaded function found, and throw them at Daniel in the hope it only our setups bring this, but seems iMac/safari WebGL guilty for this error too, just in another shader. Or maybe it will fail the same on our setups too, just currently to make it compiles it ask for 2 missing instructions, and if check on instructions come first, then it can explain all.

Can you also check those ones (which bring us that 'min' errors on our setups):

Quote:

Did they all will fail on iMac/safari the same as for us ?

I tried to find what is common between them, and find out that they all have some re-define of min(iFrame,0). Like:

Quote:

#define ZERO min(iFrame,0)


or

Quote:

#define motionBlurSteps 10 + min(0,iFrame)


or

Quote:

#define VAR_ZERO min (iFrame, 0)


Not sure though if it that redefines are the culprit.


@Daniel
Btw, seeing log output from iMac/Safari where they print guilty line before error: can we do the same? Or we better to print just line number by opStore/etc stuff ?


Edited by kas1e on 2020/10/25 18:30:34
_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: The OpenGL ES 2.0 thread
Just popping in
Joined:
2017/5/18 11:12
From Audruicq, France
Posts: 85
Just tested all of them, and yeah they're not working on Safari.
Same error in most cases, sometimes it also complains about unsupported operators:

Quote:
'>>' : bit-wise operator supported in GLSL ES 3.00 and above only
'&' : bit-wise operator supported in GLSL ES 3.00 and above only


Flying Centipede shader (https://www.shadertoy.com/view/ttlGR4) complains about lines 217 to 239:

Quote:
// find the two closest points
217
vec3[2] closestParmDistIndex = vec3[2](vec3(0, 9e9, 0), vec3(0, 9e9, 0));
'first-class array' : not supported
'[]' : array constructor supported in GLSL ES 3.00 and above only
'=' : array / non-array mismatch
'=' : cannot convert from 'const array[2] of 3-component vector of float' to 'highp 3-component vector of float'
218
float currentParm = 0.0;
219
for (int i = Z ; i < SEGMENTS ; i++) {
'min' : no matching overloaded function found
'=' : cannot convert from 'const mediump float' to 'highp int'
220
vec3 current = path(currentParm);
221
vec3 currentD = p - current;
222
float currentDist = dot(currentD, currentD);
223
if (currentDist < closestParmDistIndex[0].y) {
'y' : field selection requires structure or vector on left hand side
224
closestParmDistIndex[1] = closestParmDistIndex[0];
225
closestParmDistIndex[0] = vec3(currentParm,currentDist,float(i));
'=' : dimension mismatch
'assign' : cannot convert from 'highp 3-component vector of float' to 'highp float'
226
} else if (currentDist < closestParmDistIndex[1].y) {
'y' : field selection requires structure or vector on left hand side
227
closestParmDistIndex[1] = vec3(currentParm,currentDist,float(i));
'=' : dimension mismatch
'assign' : cannot convert from 'highp 3-component vector of float' to 'highp float'
228
}
229
currentParm -= 0.17 / length(pathd(currentParm)) * paths(currentParm);
230
}
231

232
float dOrg = 8.0;
233
float dShe = 8.0;
234

235
albedo = COLOR_SHELL;
236

237
for (int i = Z; i < 2 ; i++) {
'min' : no matching overloaded function found
'=' : cannot convert from 'const mediump float' to 'highp int'
238
float centerParm = closestParmDistIndex[i].x;
'x' : field selection requires structure or vector on left hand side
239
int centerIndex = int(closestParmDistIndex[i].z);
'z' : field selection requires structure or vector on left hand side


Happy jumping one (https://www.shadertoy.com/view/3lsSzf) complains about mat2x2 also:

Quote:
'mat2x2' : no matching overloaded function found


One of them, Shuto Highway 83(https://www.shadertoy.com/view/XdyyDV), has ONLY this error on line 134:

Quote:
uint k = 1103515245U; // GLIB C
'uint' : undeclared identifier
'k' : syntax error


ForgottenLand (https://www.shadertoy.com/view/4tdcWn) and others are giving this error several times:

Quote:
303 for(int i=0; i < min(0,iFrame)+6; i++)
'min' : no matching overloaded function found
'+' : wrong operand types - no operation '+' exists that takes a left-hand operand of type 'const mediump float' and a right operand of type 'const int' (or there is no acceptable conversion)
'<' : wrong operand types - no operation '<' exists that takes a left-hand operand of type 'highp int' and a right operand of type 'const mediump float' (or there is no acceptable conversion)


Robotic Arm Hunting Ligths (https://www.shadertoy.com/view/tlSSDV) complains at several lines:

Quote:
39 vec2[2] activeSpheres;
'first-class array' : not supported
40 vec2[3] joints;
'first-class array' : not supported
...
1
activeSpheres[0] = activeSphereGrid(time);
'=' : dimension mismatch
'assign' : cannot convert from 'highp 2-component vector of float' to 'highp float'
242
activeSpheres[1] = activeSphereGrid(time+1.);
'=' : dimension mismatch
'assign' : cannot convert from 'highp 2-component vector of float' to 'highp float'
243

244
vec3 ta0 = sphereCenter(activeSpheres[0]);
'sphereCenter' : no matching overloaded function found
'=' : dimension mismatch
'=' : cannot convert from 'const mediump float' to 'highp 3-component vector of float'
245
vec3 ta1 = sphereCenter(activeSpheres[1]);
'sphereCenter' : no matching overloaded function found
'=' : dimension mismatch
'=' : cannot convert from 'const mediump float' to 'highp 3-component vector of float'


Day 187 (https://www.shadertoy.com/view/ttfyDj) at several lines too:

Quote:

float env = smease(t/scenes[1],2.);
'scenes' : left of '[' is not of type array, matrix, or vector


Regards,
Petrol


Edited by Petrol on 2020/10/25 21:42:06
   Report Go to top

Re: The OpenGL ES 2.0 thread
Not too shy to talk
Joined:
2011/6/3 13:49
Posts: 269
Perhaps is it possible to add some kinda "include" to the shaders : a text file containing all (Nova) missing fonctions like min(), noise(), etc.. defined as macros
This "include" then just need to be concatenated with the shader
macro.txt + shader.frag = tmp.frag
Then compile/use tmp.frag

   Report Go to top

Re: The OpenGL ES 2.0 thread
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 6819
@thellier
I think in our case "min()" is not missing from Nova. Just when it redefined to something else it didn't work.

_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: The OpenGL ES 2.0 thread
Just can't stay away
Joined:
2007/7/14 21:30
From Lothric
Posts: 1238
@kas1e

With the current Shaderjoy iFrame is float, so you would need to convert all 0 to 0.0 and so on. But the next Shaderjoy version uses integer iFrame so these problems will go away.

   Report Go to top

Re: The OpenGL ES 2.0 thread
Just can't stay away
Joined:
2007/7/14 21:30
From Lothric
Posts: 1238
@Daniel & Hans

I have noticed that when creating the FBOs and then using them as textures, they appear upside down if uv coordinates are generated using gl_FragCoord (gl_FragCoord / resolution.xy).

Is this supposed to happen? It kind of feels unlogical considering that both texture coordinates and gl_FragCoord should have origin at the bottom left corner (after Nova 1.65 anyway?).

   Report Go to top

Re: The OpenGL ES 2.0 thread
Not too shy to talk
Joined:
2015/6/11 9:51
From Cologne
Posts: 435
@Capehill
Most likely you got confused with your UVs somewhere. It's a very common mistake when it comes to FBOs being used as textures. Although I have to admit that I'm not immune to such confusion and to be honest:
the primary reason why I think that you and not I got confused here is that IIRC Entwickler-X used FBO textures for cross-platform projects already and I heard no complains
In short: yes, usually you'd use flipped Vs for FBO-textures (where the first pixel is bottom-left) compared to lets-call-it file-textures (where the first texel is usually top-left in memory).

Therefore: please doublecheck your code (if possible run the critical stuff on a non-Amiga machine). If you still think that there's an issue then please upload test-code / exe to my FTP.


Edited by Daytona675x on 2020/12/22 9:31:01
   Report Go to top

Re: The OpenGL ES 2.0 thread
Just can't stay away
Joined:
2007/7/14 21:30
From Lothric
Posts: 1238
@Daytona675x

Right, the Y flipping of file-textures is the usual business and this is configurable per-channel and working as far as I can see.

But the FBOs...texture coordinates are always generated by using gl_FragCoord (application is passing only vertex coordinates) and my unproven hypothesis is that something might be wrong here.

If a fragment is written at the (0,0) coordinate when generating FBO, am I expected to sample the same value with (0,0) texture coordinate?

I cannot see the Shadertoy iOS app doing any extra flipping (they flip only the file texture) but then again, the objective-C is not on my fluent list.

But I keep checking and see if some smaller example can be made. I could try to read back those FBOs and check pixels values or something.

   Report Go to top

Re: The OpenGL ES 2.0 thread
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 6819
@All
Ogles3.1 is out for beta:

Quote:

Just finalized OpenGL ES 2 version 3.1 for Warp3D Nova / AmigaOS4. It's available on my FTP for testers and A-Eon devs, as usual. A rather small update this time:
- support for the following additional texture data types: GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV, GL_UNSIGNED_INT_10_10_10_2, GL_UNSIGNED_INT_2_10_10_10_REV.
Those are not defined for the OpenGL ES 2 standard, they are extensions of our implementation. GL_UNSIGNED_SHORT_1_5_5_5_REV has been added to work around a very high texture conversion performance hit in certain games/libs (like 6 seconds instead of less than 1 to load and prepare a texture).
The others have been added because it was a 10 minutes thingy anyway, Nova natively supports those formats.
- consequently added GL_OES_vertex_type_10_10_10_2 and GL_EXT_texture_type_2_10_10_10_REV to the extensions string.
- added support for the texture data types GL_UNSIGNED_INT_8_8_8_8 and GL_UNSIGNED_INT_8_8_8_8_REV. On our big-endian machines, GL_UNSIGNED_INT_8_8_8_8 is actually equivalent to GL_UNSIGNED_BYTE, whereas GL_UNSIGNED_INT_8_8_8_8_REV is like GL_UNSIGNED_BYTE with bytes swapped to the little-endian order.
- unfortunately, there are no existing extension strings for all those formats. May well be that our ogles2.lib is the world's only OpenGL ES 2.x implementation that supports all those texture data types at all 😉 Therefore I had to come up with our own extension strings so that client applications and libs like gl4es can actually benefit from those newly supported data types: GL_AOS4_texture_format_RGB332, GL_AOS4_texture_format_RGB332REV, GL_AOS4_texture_format_RGBA1555REV, GL_AOS4_texture_format_RGBA8888, and GL_AOS4_texture_format_RGBA8888REV.
- !don't forget to download the new include-folder too!
- version set to 3.1 (18.1.2021)
Thanks to Kasie Kasovich for inspiring me to do this stuff and for testing it!
Cheers,
Daytona675x


Now,

let's hope Mattew will not forget to include exactly this new 3.1 version to the upcoming Enhancer, as he always does

@Mattew
You will not forget to include ogles3.1 to Enhancer as you do all the time, right ?:)

_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: The OpenGL ES 2.0 thread
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 6819
@All
On Ogles2 we didn't have gl_VertexID(), so have anyone any idea how to rewrite that shader, so it will not have gl_VertexID() but still, will works as expected?

uniform sampler2D Texture0Texture1Texture2Texture3;

varying vec3 Normal;
varying vec4 Position;
varying float fogFactor;
 
void main(void)
{
    
Position gl_ModelViewMatrix gl_Vertex;
    
gl_FrontColor gl_Color;
    
Normal gl_NormalMatrix gl_Normal;
    
gl_TexCoord[0] = gl_MultiTexCoord0;
    
gl_Position ftransform();

    
vec4 bloodColor texture2D(Texture1vec2(47.5 48.047.5 48.0));
    
bool breakLoop false;

    
int y gl_VertexID 48;
    for (
int x 048x++)
    {
        
float xx 0.5;
        
float yy 0.5;
        
vec4 pixelcolor texture2D(Texture1vec2(xx 48.0yy 48.0));
        if (
pixelcolor != vec4(0.00.00.01.0))
        {
            
bool ref false;
            if (
== 47 && == 47ref true;
            if (
ref == false)
            {
                
int id 48 x;
                if (
gl_VertexID == id)
                {
                    
gl_FrontColor bloodColor;
                }
            }
        }
    }

    const 
float LOG2 1.442695;
    
gl_FogFragCoord length(vec3(Position));
    
fogFactor exp2(-gl_Fog.density *
                
gl_Fog.density *
                
gl_FogFragCoord *
                
gl_FogFragCoord *
                
LOG2);
    
fogFactor clamp(fogFactor0.01.0);
}

_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: The OpenGL ES 2.0 thread
Not too shy to talk
Joined:
2015/6/11 9:51
From Cologne
Posts: 435
@kas1e
In general: you cannot really mimic gl_VertexID unless you manually setup an extra vertex attribute and fill it with your own IDs.

Other than that you cannot really rewrite that shader here without a gl_VertexID equivalent and expect it to produce something anywhere near the originally desired output. Unfortunately there's no other shader input that seems to be appropriate to derive the missing info.

   Report Go to top

Re: The OpenGL ES 2.0 thread
Just can't stay away
Joined:
2007/7/14 21:30
From Lothric
Posts: 1238
@kas1e

Was gl_VertexID implemented in the latest Nova version or was only the freezing issue fixed?

http://www.amiga.org/developer/bugreports/view.php?id=628

   Report Go to top

Re: The OpenGL ES 2.0 thread
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 6819
@Capehill

Oh, you are right!

Quote:

Version 1.82 2020/12/14
- W3DN_SI/GCN - added gl_VertexID support (#628)
.....



Probably that need to be handled/redirected via ogles2 too then ?

_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: The OpenGL ES 2.0 thread
Just can't stay away
Joined:
2007/7/14 21:30
From Lothric
Posts: 1238
@kas1e

https://www.vertexshaderart.com/ For motivation :)

Cool if it's supported now.

   Report Go to top

Re: The OpenGL ES 2.0 thread
Not too shy to talk
Joined:
2015/6/11 9:51
From Cologne
Posts: 435
@kas1e
Quote:
Probably that need to be handled/redirected via ogles2 too then ?

If Nova supports it then there is nothing to do inside ogles2.lib. A correct #version should be enough.

   Report Go to top

Re: The OpenGL ES 2.0 thread
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 6819
@Capehill, Daniel

At least it for sure compiles with version 130 and more.

@Capehill
Quote:

Are there some shaders that use gl_vertexid? Just want to check if they work at all.

_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: The OpenGL ES 2.0 thread
Just can't stay away
Joined:
2007/7/14 21:30
From Lothric
Posts: 1238
@kas1e

You could try render a helloworld triangle and adjust its position and colors by gl_VertexID.

   Report Go to top

Re: The OpenGL ES 2.0 thread
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 6819
@Capehill

I assume we can't do so via ShaderJoy, as vertex shaders there always the same and can't be changed?

_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: The OpenGL ES 2.0 thread
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 6819
@All
Need help with vertex shaders stuff. There 2 very small test shaders:

Fragment one:

#version 130
precision highp float;
precision highp int;
void main()
{
    
gl_FragColor vec4(0.0000000.0000001.0000001.000000);
}


Vertex one:

#version 130
precision highp float;
precision highp int;
uniform sampler2D Texture;

varying vec4 Position;

void main(void)
{
    
gl_Position vec4(0.000000);
}


Now, I got some small test case which loads up shaders, etc (working them or not, not so matter, that just to loads up and links).

So, they compile fine but fail to links on amigaos4. On win32, the same test-case program absolutely and the same shaders => compiles and links(!) fine. Both Glslangvalidator and w3dnshaderinfo test passes fine, so it just something deeper like maybe on the drivers level

All I find out, for now, is if I comment out in the vertex shader that string: "uniform sampler2D Texture;", then it did links fine! Once I uncomment it back, it stops links!

Question is: wtf ?:)

Maybe the issue is that our vertex shaders just didn't support texture uniforms? Or just something else messed up?


Edited by kas1e on 2021/1/23 9:35:04
Edited by kas1e on 2021/1/23 9:36:55
Edited by kas1e on 2021/1/23 9:37:50
Edited by kas1e on 2021/1/23 9:40:40
Edited by kas1e on 2021/1/23 9:41:45
Edited by kas1e on 2021/1/23 9:45:45
_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top


« 1 2 3 4 (5) 6 »



[Advanced Search]



Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project