OpenTechEngine / Discussions

The issues of this project are abused as a discussion forum for Open Tech
4 stars 0 forks source link

idTechX can't display shader effects on top of other shader effects #31

Open BielBdeLuna opened 8 years ago

BielBdeLuna commented 8 years ago

imagine the common situation where a window with deformation shader is behind an explosion with another deformation shader, only one deformation is displayed (the one closer)

I wonder if this issue could be resolved with some JIT magic on a per frame basis, so the first step would be to identify the shaders every pixel is subjected to, then on those pixels subjected to more than one shader dos some JIT adding the shaders together creating a new shader (just for that pixel!) in order to render the pixel correcly

maybe there could be a way to simplify the process and identify what pixels would benefit from the same shader?

do you think that it could be possible?

ghost commented 8 years ago

I still don't know how these things work, but can the shader(assuming screen-space) be composited to the world-space or z-depth?

BielBdeLuna commented 8 years ago

maybe a render to texture feature can be setup, render to texture the screenspace of every instance, and keep rendering an area for as much as shaders is subjected to.

ghost commented 8 years ago

Then destroy when it is not needed anymore.