inexorgame-obsolete / deprecated-cube-engine-inexor

UNMAINTAINED: Please have a look at the vulkan-renderer
https://inexor.org
zlib License
11 stars 1 forks source link

Dynamic, safe and plugin-able rendering system #477

Open a-teammate opened 7 years ago

a-teammate commented 7 years ago

New rendering system

Disclaimer: I know about #101 and #310, but this not only about tesseract and not only about lights

We want a robust, easy-to-use system which allows dynamic worlds. Currently we have to prebake lightmaps, which is a time-consuming process of the editing experience.

There is another Cube2 fork called "Tesseract", which replaces lightmapping with deferred rendering. That change reduces the time to create lights significantly (only step required to do manually in Tesseract is calculating normals), as lights are rendered in realtime. As Tesseract is built in the same spirit as Sauerbraten, it's using various techniques to allow high framerates. It's not state of the art anymore, but close enough. However as it's a very close relative of Sauerbraten, it's source is also written in a similar manner.

Issues:

The good thing is that the Tesseract code has a lot of comments (compared to the Sauerbraten code base). I suggest we design the new system as follows:

BGFX as backend

Tesseract on top

It offers:

things we'll drop:

ToDo

THIS WON'T HAPPEN TOO SOON!! (if I do this) as other things have prio: InexorTree and the sourcebase modularization and cleanup

Tesseract code is in octarender, renderlights, rendergl and material + envmap generation from texture.cpp Loose ends can be decoupled using inexors better modularized sourcebase, bgfx (and the InexorTree for the new managers).


shader plug-ins:

Possible follow up issues

Furthermore for a "you map it, it's instantly production ready"-like experience, we will need a solution for:


Other:

@bkaradzic I just highlight you here to let you know :)

IAmNotHanni commented 7 years ago

Wow what a ticket :)

bkaradzic commented 7 years ago

👍

cons: also using a selfwritten language

Based on GLSL, and most of existing GLSL code trivially ported (close to copy&paste) to it.

Con: How well tested is it for complete high-performance engines?

Let me know if you have any perf issues with it.

Also feel free to ask any questions https://gitter.im/bkaradzic/bgfx or open issues in main repo.

Croydon commented 7 years ago

things we'll drop: grass rendering it sucks in its current form, maybe add another way later on

It is fine for me if it would cost enormous amount of time to keep it with all of these changes, if this shouldn't be the case then please keep it. Grass rendering is a rather basic feature we should keep, even if it might not be the best it is better than not having it all.

Rest sounds good to me :)