07-20-2021, 04:04 AM
Hi Domarius!
Long time no see, congratulations for learning new tech with shaders!
There's no absolute "best tool" to do something, multiple factors matter. So any framework you choose that satisfies your requirements will be good.
Why doesn't Tilengine use modern shaders? My vision with Tilengine is replicating the inner working and pipeline of actual 2D chipsets -albeit heavily improved-, not emulating the end result:
Yes, linescroll can be emulated by displacing pixels in a pixel buffer as you say, and have color palettes by using integer texture lookups. But raster effects are much more than this. You can do color shifts, vertical scaling, layer and sprite multiplexing...
But shaders are cool! I did some research some years ago and I really like their flexibility, especially after introducing unfiltered integer lookups and arithmetic. But they weren't created having retro 2D graphics in mind, you can use them for this purpose but having important concepts clear so the end result doesn't get screwed.
I didn't know about Kha you mention, I'll take a look to guess where it fits and what does it offer.
Good luck with your new game! Let us know how does it progress.
Long time no see, congratulations for learning new tech with shaders!
There's no absolute "best tool" to do something, multiple factors matter. So any framework you choose that satisfies your requirements will be good.
Why doesn't Tilengine use modern shaders? My vision with Tilengine is replicating the inner working and pipeline of actual 2D chipsets -albeit heavily improved-, not emulating the end result:
- 2D chipsets aren't programable, but configurable -you don't draw, you set attributes-
- Pixel art is about low resolutions, so high fillrate of modern GPUs isn't used
- A shader implementation of Tilengine pipeline would require "ext_shader4" feature of OpenGL 3.0 or newer. When I started Tilengine, many integrated GPUs nor mobile phones had this feature, but could run a CPU implementation at full speed.
Yes, linescroll can be emulated by displacing pixels in a pixel buffer as you say, and have color palettes by using integer texture lookups. But raster effects are much more than this. You can do color shifts, vertical scaling, layer and sprite multiplexing...
But shaders are cool! I did some research some years ago and I really like their flexibility, especially after introducing unfiltered integer lookups and arithmetic. But they weren't created having retro 2D graphics in mind, you can use them for this purpose but having important concepts clear so the end result doesn't get screwed.
I didn't know about Kha you mention, I'll take a look to guess where it fits and what does it offer.
Good luck with your new game! Let us know how does it progress.