Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tilengine vs shaders
#2
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:
  • 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.
I've seen many "retro" 2D games developed in Unity and Game Maker Studio that have a wrong concept of pixel. Authors end up mixing assets of different "pixel sizes" on a Full HD framebuffer, having for example 4x4 and 5x5 macro-pixels, moving at 1 pixel granularity of the final framebuffer. This is totally wrong, producing "unaligned pixels" that ruin any attempt of using a post-processing CRT filter that require a low resolution source. A pixel doesn't have size, it is not a square but a dimensionless point. And I've seen those faults in several commercial games. You must be careful with this. Tilengine does this right, as only the final framebuffer gets upscaled with all pixels having always the same size and alignment.

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.
Reply


Messages In This Thread
Tilengine vs shaders - by Domarius - 07-19-2021, 10:48 AM
RE: Tilengine vs shaders - by megamarc - 07-20-2021, 04:04 AM
RE: Tilengine vs shaders - by Domarius - 07-23-2021, 07:42 AM
RE: Tilengine vs shaders - by megamarc - 07-26-2021, 04:56 PM
RE: Tilengine vs shaders - by Domarius - 08-03-2021, 09:02 AM
RE: Tilengine vs shaders - by megamarc - 08-07-2021, 06:26 PM
RE: Tilengine vs shaders - by Domarius - 08-20-2021, 12:39 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)