Search found 1786 matches

by Kjell
Fri Jul 23, 2021 11:45 am
Forum: General discussion
Topic: Questions about ES2/GL3 shaders
Replies: 72
Views: 10873

Re: Questions about ES2/GL3 shaders

Hi Ats, I'm experiencing a new problem with my conversion to ES2/GL3: a Material with DrawBackFace is showing up on Windows, but not on Android. Just double-checked this on Android myself and i'm experiencing no problems. I used the following example to test this: <?xml version="1.0" encoding="iso-8...
by Kjell
Tue Jul 20, 2021 9:07 am
Forum: Off-topic
Topic: Windows 11
Replies: 3
Views: 641

Re: Windows 11

Hej Ville, That sounds strange. How can a requirement for a certain level of DirectX compatibility end up with some GPUs only supporting OpenGL 1.1? It's not the DirectX part, it's the WDDM 2.0 requirement. GPUs that have reached EOL will ( probably ) not get drivers for Windows 11 and thus get stuc...
by Kjell
Tue Jul 20, 2021 8:57 am
Forum: General discussion
Topic: Questions about ES2/GL3 shaders
Replies: 72
Views: 10873

Re: Questions about ES2/GL3 shaders

Hi Ats, I believe the problem is coming from the RenderParticles.PColor that doesn't seem to be working. Hmm .. i'm not having any trouble with RenderParticles.PColor here. Does the following ES3 example work for you? <?xml version="1.0" encoding="iso-8859-1" ?> <ZApplication Name="App" Caption="ZGa...
by Kjell
Mon Jul 19, 2021 3:31 pm
Forum: Off-topic
Topic: Windows 11
Replies: 3
Views: 641

Windows 11

Hi guys, Bit of a troubling development that started in Windows 10 and is taking another step in Windows 11: Windows 11 requirements Graphics card: Compatible with DirectX 12 or later, with a WDDM 2.0 driver. The result of this is that any Intel GPU up to 7th generation chipsets ( Ivy Bridge ) will ...
by Kjell
Sun Jul 18, 2021 6:38 pm
Forum: General discussion
Topic: Questions about ES2/GL3 shaders
Replies: 72
Views: 10873

Re: Questions about ES2/GL3 shaders

Hi Ats, I can't display sprites correctly (colors + transparency). Perhaps you forgot to multiply the texture coordinates by the texture matrix? In any case, here's a quick GL3 example: <?xml version="1.0" encoding="iso-8859-1" ?> <ZApplication Name="App" Caption="ZGameEditor application" GLBase="1"...
by Kjell
Mon Jul 05, 2021 6:40 pm
Forum: Feature requests
Topic: [FIXED] Same background color for PC and Android
Replies: 9
Views: 1312

Re: Same background color for PC and Android

Hi Ats, Oh nice, I didn't know about that. You can do fully transparent as well of course, which makes the behavior similar to Android / WebGL. Below is what a simple RenderParticles project looks like with the Spotify website in the background ( click image for short video ). https://i.imgur.com/RL...
by Kjell
Mon Jul 05, 2021 3:49 pm
Forum: Feature requests
Topic: [FIXED] Same background color for PC and Android
Replies: 9
Views: 1312

Re: Same background color for PC and Android

Hi Ats, Setting the Android activity background to black is probably the easiest OS "solution" yea 8) By the way, when you enable background transparency in Windows you actually get a semi-transparent result by default ( which is different from Linux ). Not that it matters, but just to indicate that...
by Kjell
Mon Jul 05, 2021 1:03 pm
Forum: Feature requests
Topic: [FIXED] Same background color for PC and Android
Replies: 9
Views: 1312

Re: Same background color for PC and Android

Hi Ats, That is what I suspected in my first post. If you start a new project and right-click on the color box of App.ClearColor you can see that its alpha value is 0 :wink: In which case it interesting to start with {0,0,0,0} since the exe can't be transparent? You mean a Windows standalone executa...
by Kjell
Mon Jul 05, 2021 10:27 am
Forum: Feature requests
Topic: [FIXED] Same background color for PC and Android
Replies: 9
Views: 1312

Re: Same background color for PC and Android

Hi Ats, If we do not set App.ClearColor on the project, screen is black on PC, but white on Android. If we set a color to something else (ex: RED), it is red on both. Then, if we set it to BLACK again, it's black on both. Keep in mind that by default App.ClearColor is {0,0,0,0} ( which matches the d...
by Kjell
Sun Jul 04, 2021 9:25 am
Forum: General discussion
Topic: Questions about ES2/GL3 shaders
Replies: 72
Views: 10873

Re: Questions about ES2/GL3 shaders

Hi Ats, The weird thing is that the results are different on PC and Android, again. Looks like the same problem as before .. semi-transparent pixels blending the white background of the Android activity ( or whatever is causing that behavior on Android ). Perhaps you can try re-writing the shader fr...
by Kjell
Fri Jun 18, 2021 5:44 pm
Forum: General discussion
Topic: Questions about ES2/GL3 shaders
Replies: 72
Views: 10873

Re: Questions about ES2/GL3 shaders

Hi Ats, How would you pass the color of a Material to the Shader then? The color of a material already gets passed to a ES2/GL3 shader automatically by ZGE ( uniform vec4 globalColor ) :wink: But if you'd for example want to pass the specular color i'd personally use a function. You could either wri...
by Kjell
Fri Jun 18, 2021 3:29 pm
Forum: General discussion
Topic: Questions about ES2/GL3 shaders
Replies: 72
Views: 10873

Re: Questions about ES2/GL3 shaders

Hi Ats, So what if I render several materials at the same time. Would it be better to have an array per shader, or reuse the same array before rendering each material? That's difficult to answer. It really depends on a bunch of factors .. but in general it's probably most convenient to just reuse th...
by Kjell
Fri Jun 18, 2021 10:55 am
Forum: General discussion
Topic: Questions about ES2/GL3 shaders
Replies: 72
Views: 10873

Re: Questions about ES2/GL3 shaders

Hi Ats, But how does compatible works then if those values doesn't exist in ZGE? Just because ZGE doesn't use certain OpenGL features that doesn't mean they don't exist. OpenGL is basically a state machine. If they have default values, then I shouldn't be worried not using them in the ES2/GL3 shader...
by Kjell
Fri Jun 18, 2021 4:52 am
Forum: General discussion
Topic: Questions about ES2/GL3 shaders
Replies: 72
Views: 10873

Re: Questions about ES2/GL3 shaders

Hi Ats, All of those built-in variables are actually pre-calculated using various parameters by the OpenGL driver. gl_FrontLightModelProduct = Material.EmissionColor + Material.AmbientColor * App.AmbientLightColor gl_FrontLightProduct[0].ambient = Material.AmbientColor * Light0.AmbientColor gl_Front...
by Kjell
Thu Jun 17, 2021 8:40 am
Forum: General discussion
Topic: Questions about ES2/GL3 shaders
Replies: 72
Views: 10873

Re: Questions about ES2/GL3 shaders

Hi Ville, About the missing alpha in vertex colors, I could initialize this to 1.0 but I also want to understand why this is not needed on desktop. I'm not entirely sure, but i suspect that a Android Activity has a white background by default and any pixel of your front-buffer that isn't fully opaqu...