• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

request for updating opengl & opengl es for gms2

so I've been dealing with 3D in gms2 for a while and chatting with people that also work on 3D projects with gms2. outdated opengl es version seems to be a huge setback for most of us.

lack of mrts in glsl es is a real bummer. dealing with hlsl isnt that bad but it's much more picky, also if glsl es had mrts we could avoid rewriting lots of shaders. geometry shaders would be a great treat as well.

at one point I believe all of us hit the limitations of current version of opengl es. so I'm encouraging people to vocalize their demands.

also if I'm not mistaking, nintendo switch supports opengl 4.5 and opengl es 3.2. so if switch builds of gms2 uses them, it wouldnt be much trouble for us to have on pc (I assume).
 

Dragonite

Member
Am one of said people who's been chatting about this. The ability to use MRT in GLSL ES would definitely be nice.

Geometry shaders would undoubtedly be fascinating as well, but first things first.
 

Juju

Member
No texture sampling in vertex shaders kills a huge number of techniques, and that's meant to be supported in GLSL ES 1.00 anyway.

In the past, the limiting factor was claimed to be phones, but GLSL ES 1.00 is *11 years old* now. It'd be very silly to claim that we need backwards compatibility with anything that old in the phone space. Oldest model I've been asked to explicitly support is an iPhone 6S from 2015.

HTML5 support might be a constraint these days, though most browsers support WebGL2.0 (built on GLSL ES 3.0). Safari is a notable exception however, and that does represent a non-trivial number of people (allegedly 2.3% of global users).
 
Last edited:
I don't exactly get why is that as well, why opengl is not an option for windows, I don't think it's any slower than directx 11. wish we could at least get an option to choose graphics api.
 

Sybok

Member
I don't exactly get why is that as well, why opengl is not an option for windows, I don't think it's any slower than directx 11. wish we could at least get an option to choose graphics api.
There was talk of being able to choose your renderer, but that was advised by YYG as being way way down on the to do list.
 

Yal

🐧 *penguin noises*
GMC Elder
No texture sampling in vertex shaders kills a huge number of techniques, and that's meant to be supported in GLSL ES 1.00 anyway.
iirc the 1.0 specification linked to in GM's documentation claims it's supported, but you're not guaranteed any texture uniforms in a vertex shader (minimal allowable number for an implementation is 0). I tried it out, things broke because it was zero, and then rewrote things thinking that it would've been too unreliable to use even if it was just bad luck.

With that said, bark bark. I've just finished a 3D engine with some basic dynamic lightning and stuff, and I had to rewrite the core shader from scratch at least 3 times because basic stuff used in all the tutorials/examples I learned from weren't supported (I had no plans to use native HLSL because it would ruin compatibility) and I ended up having to drop shadowmapping entirely because GM doesn't support shadowmaps/cubemaps and my workaround drawing on ordinary textures didn't have good enough precision to be usable.

Most of the shader compilation is done on the target computer, at runtime, by a separate compiler that gets the shader as a blob of text to parse, anyway, so I can't imagine it being that difficult to support a higher version, compared to other popular demands like a WYSIWYG 3D room editor.
 

Yal

🐧 *penguin noises*
GMC Elder
Aaah, this I did not know

What tutorials were you reading? I've been able to get reasonably good shadowmapping going, but maybe my standards are low!
Mostly some thing on Github that was just called the "OpenGL shader tutorial", but I also downloaded a bunch of examples from the Marketplace (Xor is the only one I remember the name of off the top of my head). Part of my issues were caused by having an arbitrary number of lights, sharing the same texture for shadow distance data (by necessity, since the cap is 8 and you're not necessarily guaranteed that many texture slots!)... the precision suffered as a result.

Light data itself was fine since I pass in the coordinates of all lights (coded as color data in a "data blob" texture to get past the uniform memory limitations) as data (instead of texture distance maps) and could work at it with infinite precision, but it just wouldn't do for sampling shadowmaps for any reasonable distance if you're already limited to "one size fits all distances" maps and also need to make them small to fit in with a bunch of other ones.

I probably could've got it to work if only one light was able to cast shadows or something, but I ended up having a workaround where I just draw circles on a flat plane under objects' positions and then map it to the coordinates in 3D space... the only thing I really wanted was to have small shadows under objects, anyway, so it felt like overkill to make full actual shadowmaps.
 

lolslayer

Member
There are definitely some simple things that would be nice if they were supported, even for 2D games (these things are also completely supported by the OGL ES 2 specification unless stated otherwise):
  • Seperating depth buffers from surfaces. With this I mean that next to a surface, you need to set up a depth render buffer separately and then bind them both when rendering to a surface. This way you could easily share the results of a depth buffer with other surfaces, which could be nice if you want to use the results of a scene as a depth mask. Depth buffers can be very handy for depth sorting in 2D games when you work with an "isometric" view, so this would still be a very relevant thing to use in 2D game development.
  • Stencil buffers. Many interesting techniques are possible for this. We know that this is also relevant for 2D games: after all, even Yoyo acknowledged its usefulness. Stencil buffers could be combined with the depth render buffers when setting them up.
  • Cubemaps. Not really that relevant for 2D but it would be neat either way. And who knows, 2D normal maps are a thing, so you can probably combine that with a cubemap as well.
  • Different texture formats than just r8g8b8a8. R32 could be really useful when writing depth buffer data out. I know that this format is not supported by the OGL ES 2 specification, but most GPUs have an extension that supports this format. And when compatibility is really that much of a problem it would at least be nice to have R8 support for optimization purposes.
  • Writing depth values directly to a surface. While this behavior is also not supported by the OGL ES 2 specification, again, most GPUs do support an extension that allows this behavior to happen nonetheless.
  • Blend functions. Then we can finally subtract values from a surface when rendering to it.
  • Run-time shader compilation by a file and/or string input. This could be nice when overwriting a constant value on run-time to comply with graphics settings. Think of bloom blur iterations for example (bloom is also useful for 2D games, wink wink).
  • Vertex-shader support for sampler accessing. There's no excuse that this isn't in already Yoyo, get to it!



 
Last edited:
Just reviving the thread because those things we listed are needs more than wants and we haven't got a reply yet from yoyo. Bare minimum it wouldn't be much to ask for having surfaces with different colour formats and being able to sample depth buffer?
 

chamaeleon

Member
Just reviving the thread because those things we listed are needs more than wants and we haven't got a reply yet from yoyo. Bare minimum it wouldn't be much to ask for having surfaces with different colour formats and being able to sample depth buffer?
If you want a response this forum is not the means by which to get it from YYG, as has been stated many times in other threads. If you want to ask for a bare minimum of something, you need to use their bug tracking system.
 
Top