Search found 1900 matches

by Kjell
Thu Jun 03, 2021 1:35 pm
Forum: General discussion
Topic: Questions about ES2/GL3 shaders
Replies: 76
Views: 94236

Re: Questions about ES2/GL3 shaders

Hi Ats, But I really don't understand why the noise bitmap is working on PC, but not on Android. It's just white. Could you try adding a BitmapExpression containing "Pixel.A = 1" to your NoiseBitmap? So, like this: ZZDC<?xml version="1.0" encoding="iso-8859-1" ?> <Bitma...
by Kjell
Thu Jun 03, 2021 10:55 am
Forum: General discussion
Topic: Questions about ES2/GL3 shaders
Replies: 76
Views: 94236

Re: Questions about GLES2 shaders

Hi Ats, I was looking at your phong shader, and while it's really showing the use of Specular and Emission colors, it doesn't show up on ES2/GL3. Right, as mentioned .. it's a shader for legacy OpenGL so it doesn't work ( properly ) with ES2/GL3. I'm going to start over again, and searching for exam...
by Kjell
Thu May 27, 2021 11:28 am
Forum: General discussion
Topic: Questions about ES2/GL3 shaders
Replies: 76
Views: 94236

Re: Questions about GLES2 shaders

Hi Ats, Let's say, the phong one. That phong shader is written for legacy OpenGL ( GLBase = compatible ). I suspect you changed the "gl_ModelViewProjectionMatrix" part in the fragment shader, but that's not nearly enough to convert it to a modern shader ( GLBase = GL3/ES2 ). Anyway, here's...
by Kjell
Thu May 27, 2021 10:41 am
Forum: General discussion
Topic: Questions about ES2/GL3 shaders
Replies: 76
Views: 94236

Re: Questions about GLES2 shaders

Hi Ats, What would be the logic to update the light shader, so the cube doesn't rotate with his shadows stuck on it? What light shader are you referring to? I looked at all the examples you posted in this thread but i can't find a light shader. I've read many explanations, but since GLES2 is aging f...
by Kjell
Wed May 26, 2021 2:03 pm
Forum: General discussion
Topic: Questions about ES2/GL3 shaders
Replies: 76
Views: 94236

Re: Questions about GLES2 shaders

Hi Ats, And another weird thing is happening: when you press SPACEBAR to display the text, alpha shader cease to work. I'd really like to understand why... :? It's because you're enabling blending once in your App.OnLoaded and then RenderText overrides the OpenGL blend state and doesn't restore it p...
by Kjell
Wed May 26, 2021 1:25 pm
Forum: General discussion
Topic: Questions about ES2/GL3 shaders
Replies: 76
Views: 94236

Re: Questions about GLES2 shaders

Hi guys, why the alpha transparency shader is working on App.OnRender, but not in Model.Onrender? You mean when previewing SphereModel? Transparency does actually work, but it's not very "pronounced" due to the background color and your alpha value. https://i.imgur.com/MiBPm8A.png I can us...
by Kjell
Tue May 25, 2021 5:10 pm
Forum: General discussion
Topic: Questions about ES2/GL3 shaders
Replies: 76
Views: 94236

Re: Questions about GLES2 shaders

Hi Ats, Oh. So MeshSphere can't do that, but rounded MeshCube can. You can still use MeshSphere if you want .. you just need to add a MeshExpression where you assign the texture coordinates yourself. Here's a simple example: <?xml version="1.0" encoding="iso-8859-1" ?> <ZApplicat...
by Kjell
Tue May 25, 2021 3:42 pm
Forum: General discussion
Topic: Questions about ES2/GL3 shaders
Replies: 76
Views: 94236

Re: Questions about GLES2 shaders

Hi Ats, But putting it to ModelDefined doesn't light up the sphere. It's still black in preview, and white in release. No texture. As mentioned, that's because MeshSphere doesn't generate any texture coordinates, so the bottom-left pixel ( texCoord 0,0 ) of your texture ends up being used for the en...
by Kjell
Tue May 25, 2021 11:07 am
Forum: General discussion
Topic: Questions about ES2/GL3 shaders
Replies: 76
Views: 94236

Re: Questions about GLES2 shaders

Hi Ats, The first should display the same texture as the ground, but it is black instead. You can't use "Generated" TexCoords ( which uses glTexGen ) in OpenGL ES, you have to use "ModelDefined". However, a MeshSphere doesn't generate texture coordinates for the mesh ( not sure w...
by Kjell
Sun May 09, 2021 12:33 pm
Forum: Bug reports
Topic: One in two BitmapFont lose transparency on Android
Replies: 17
Views: 19319

Re: One in two BitmapFont lose transparency on Android

Hej Ville, Kjells suggestion sound ok, and it may not even be needed to save/restore the blend state at all. It depends on where it is used. Saving & restoring the blend state in RenderText.Execute isn't needed no, but since you haven't implemented attribute masking in fakePushAttrib it happens ...
by Kjell
Wed May 05, 2021 4:07 pm
Forum: Bug reports
Topic: One in two BitmapFont lose transparency on Android
Replies: 17
Views: 19319

Re: One in two BitmapFont lose transparency on Android

Hi guys, Here's the result on the old Galaxy SII (2011) That looks correct :) I just tested on 2 Android devices myself and had similar results; it worked properly on one of them and i had the same issue as Ats on the other. @Ville - Maybe it would be easiest to ditch the glGet calls in fakePushAttr...
by Kjell
Wed May 05, 2021 10:57 am
Forum: Bug reports
Topic: One in two BitmapFont lose transparency on Android
Replies: 17
Views: 19319

Re: One in two BitmapFont lose transparency on Android

:| Alright, seems like glGet(GL_BLEND) simply returns the opposite of what the current blend state actually is. So it returns FALSE when blending is enabled and TRUE when blending is disabled. This could be a Android OpenGL driver issue rather than a ZGE issue ( not 100% sure though ). I'll try to t...
by Kjell
Wed May 05, 2021 10:41 am
Forum: Bug reports
Topic: One in two BitmapFont lose transparency on Android
Replies: 17
Views: 19319

Re: One in two BitmapFont lose transparency on Android

:| Dang-it, didn't know / forgot(?) that Transparency=BlackColor results in white pixels ( instead of black ) on Android. White-on-white text is a little hard to read you know .. please try the same project with a silver Dina font instead of white: <?xml version="1.0" encoding="iso-88...
by Kjell
Wed May 05, 2021 10:28 am
Forum: Bug reports
Topic: One in two BitmapFont lose transparency on Android
Replies: 17
Views: 19319

Re: One in two BitmapFont lose transparency on Android

Hi Ats, Can you try this project on your Android device? <?xml version="1.0" encoding="iso-8859-1" ?> <ZApplication Name="App" Caption="ZGameEditor application" ClearColor="0 0.502 1 1" FileVersion="2"> <OnLoaded> <ZExternalLibrary ModuleNa...
by Kjell
Tue May 04, 2021 12:01 pm
Forum: Your projects
Topic: OMEGANAUT
Replies: 96
Views: 177872

Re: OMEGANAUT

:idea: Just to clear this up: ┌─────────────┬──────────────┬───────────┬───────────────────┬────────────────┐ │ │PC(Compatible)│PC(ES2/GL3)│Android(Compatible)│Android(ES2/GL3)│ ├─────────────┼──────────────┼───────────┼───────────────────┼────────────────┤ │Legacy Shader│OK │OK │ERROR │ERROR │ ├───...