OMEGANAUT
Moderator: Moderators
Re: OMEGANAUT
New release for Omeganaut today with Virtual Reality!!! Put on your favorite VR device and blasts off your enemies in glorious 3D!
Also, the gamepad is back on Android. It was a problem coming from Zge.java that was replaced by a crappy one back in February. There are so many files everywhere when it comes to Android... I took the opportunity to clean all my ZGE folders and start from scratch.
If you have a fancy headset such as Oculus or Vive, I need your feedback, because all I have is a Google Cardboard
The game is here: https://www.txori.com/index.php?static21/omeganaut
But I'm thinking about making an itch.io page...
Also, the gamepad is back on Android. It was a problem coming from Zge.java that was replaced by a crappy one back in February. There are so many files everywhere when it comes to Android... I took the opportunity to clean all my ZGE folders and start from scratch.
If you have a fancy headset such as Oculus or Vive, I need your feedback, because all I have is a Google Cardboard
The game is here: https://www.txori.com/index.php?static21/omeganaut
But I'm thinking about making an itch.io page...
Last edited by Ats on Wed Dec 18, 2019 10:27 am, edited 1 time in total.
Re: OMEGANAUT
With all those animated screenshots and covers I made for the game, I finally decided to create an itch.io webpage
https://txori.itch.io/omeganaut
https://txori.itch.io/omeganaut
Re: OMEGANAUT
I'm experiencing a problem with shadows on Android (because of shaders) but also on some kind of PC. I saw that on a Twitch video, I'm still expecting that guy's response about his hardware. Maybe a chromebook? Anyway...
Here's the shadow when it works: a flattened spaceship colored with a single color darker than the ground. And when it's broken: the ship is colored but keeps its original vertex colors. I think it's the result of vertex color + shadow color.
My shadow works like that:
A BitmapExpression that gets updated when the ground changes color:
And a Vertex Shader:
I don't recall how I got to this, I made that in 2017... It's working, but not on Android.
So I was wondering if there could be an even simpler way to color an entire Model who HasVertexColors activated. Maybe by calling something like glMaterialfv to color the model with the needed color?
Edit: Or maybe I should just upgrade the project to GLBase ES2/GL3?
Here's the shadow when it works: a flattened spaceship colored with a single color darker than the ground. And when it's broken: the ship is colored but keeps its original vertex colors. I think it's the result of vertex color + shadow color.
My shadow works like that:
A BitmapExpression that gets updated when the ground changes color:
Code: Select all
Pixel.R = 0.1 + GroundColor.X * 0.2;
Pixel.G = 0.1 + GroundColor.Y * 0.2;
Pixel.B = 0.1 + GroundColor.Z * 0.2;
Pixel.A = 1;
Code: Select all
void main(void)
{
vec4 v = vec4(gl_Vertex);
gl_Position = gl_ModelViewProjectionMatrix * v;
}
So I was wondering if there could be an even simpler way to color an entire Model who HasVertexColors activated. Maybe by calling something like glMaterialfv to color the model with the needed color?
Edit: Or maybe I should just upgrade the project to GLBase ES2/GL3?
Last edited by Ats on Mon May 03, 2021 7:15 pm, edited 3 times in total.
Re: OMEGANAUT
Hi Ats,
K
Not really, the RenderMesh component automatically enables & disables the client state for all used vertex attributes, so you'd have to write your own RenderMesh function that allows you to control which attributes you want to use ( or add this feature to the RenderMesh component ).
If you want to use shaders on Android make sure to check out GLES2Demo.zgeproj in the Projects folder that comes with ZGE.
K
Re: OMEGANAUT
That's exactly what I was looking at while you were respondingIf you want to use shaders on Android make sure to check out GLES2Demo.zgeproj in the Projects folder that comes with ZGE.
But I can't get it to work:
Error in Vertex shader compilation (Shader1)
0:1(1): error: syntax error, unexpected NEW_IDENTIFIER
Or is it working only on Android?
Re: OMEGANAUT
Hi Ats,
Are you using App.GLBase = ES2/GL3?
K
Are you using App.GLBase = ES2/GL3?
K
Re: OMEGANAUT
Hmm,
K
Try adding "#version 140" at the top of each vertex & fragment shader source in that example. Shader compilers have become a lot more strict over the past years ( if you're using recent GPU drivers ).
K
Re: OMEGANAUT
With #version 140 I get new errors:
Error in Vertex shader compilation (Shader1)
Òÿÿœ°2
Error in Vertex shader compilation (Shader1)
VW@
Error in Vertex shader compilation (SpriteShader)
üËÿÿ¼°2
On the other hand, ShaderDemo.zgeproj is working fine, and even display a flattened teacup without error messages when ES2/GL3 is activated.
Error in Vertex shader compilation (Shader1)
Òÿÿœ°2
Error in Vertex shader compilation (Shader1)
VW@
Error in Vertex shader compilation (SpriteShader)
üËÿÿ¼°2
On the other hand, ShaderDemo.zgeproj is working fine, and even display a flattened teacup without error messages when ES2/GL3 is activated.
Re: OMEGANAUT
Weird, looks like there's some text-encoding issue going on ( at least with the errors ). Anyway, can you try removing the precision statements? It probably won't work on Android then, but perhaps that will make it work on Windows.
That demo doesn't have any precision statements. But it shouldn't work when switching to ES2/GL3 though .. what GPU do you have?
K
Re: OMEGANAUT
It's not crashing without "precision mediump float;" but the result isn't impressive:
I'll try on the other computer tomorrow
Re: OMEGANAUT
And you where right. The drivers are tripping. Or maybe it's another problem with linux. I'll investigate tomorrow
Re: OMEGANAUT
Hi Ats,
Also, what shader version is supported by your GPU driver in Wine and / or Windows? It should mention that in the log after starting ZGameEditor.
K
Are you running ZGameEditor in Wine or did you build a Linux standalone? And did you get the same results when trying ShaderDemo.zgeproj on Windows ( in case you tried that as well )?
Also, what shader version is supported by your GPU driver in Wine and / or Windows? It should mention that in the log after starting ZGameEditor.
K
Re: OMEGANAUT
Linux + Wine
The GL Shaders version is 4.60
GLES2Demo "precision mediump float;" has to be deactivated otherwise it crashes. And I didn't see that there was a shader for the text too yesterday.
ShaderDemo (switched to ES2/GL3) Windows
The GL Shaders version is 4.60 - Build 27.20.100.8280 for the laptop,
and 4.60 NVIDIA for the other one.
GLES2Demo
The result is the same with "precision mediump float;" deactivated or not.
ShaderDemo (switched to ES2/GL3)
The result is the same.
The GL Shaders version is 4.60
GLES2Demo "precision mediump float;" has to be deactivated otherwise it crashes. And I didn't see that there was a shader for the text too yesterday.
ShaderDemo (switched to ES2/GL3) Windows
The GL Shaders version is 4.60 - Build 27.20.100.8280 for the laptop,
and 4.60 NVIDIA for the other one.
GLES2Demo
The result is the same with "precision mediump float;" deactivated or not.
ShaderDemo (switched to ES2/GL3)
The result is the same.
Re: OMEGANAUT
Hi Ats,
"Precision qualifiers are added for code portability with OpenGL ES, not for functionality. They have the
same syntax as in OpenGL ES, as described below, but they have no semantic meaning, which includes no
effect on the precision used to store or operate on variables."
K
Weird .. the "precision" statements should just be ignored unless you're running on ES or Vulkan. Quoted from the GLSL spec ( 1.3 and up ):
"Precision qualifiers are added for code portability with OpenGL ES, not for functionality. They have the
same syntax as in OpenGL ES, as described below, but they have no semantic meaning, which includes no
effect on the precision used to store or operate on variables."
That doesn't make sense .. try switching to ES2/GL3 then saving the file as ShaderDemoES2 and then reloading it. Maybe it's using cached shader objects or something.
K