[No] Postprocess shaders for sky

Moderator: Developers

Postprocess shaders for sky

Postby Marisa Kirisame » Thu Mar 08, 2018 12:02 pm

This is kind of a wild idea but... How about a postprocess shader that applies on top of the sky? (I assume skies are done on a separate render pass). An "aftersky" keyword has been suggested for this.

Being able to make procedural "backgrounds" would be fun. There are some things that just aren't easily doable with conventional skyboxes.
User avatar
Marisa Kirisame
ZScript Magician
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: Marisa Kirisame#4689
Twitch ID: magusmarisa

Re: Postprocess shaders for sky

Postby dpJudas » Thu Mar 08, 2018 12:28 pm

Can't you just use a texture shader for this in a conventional skybox?
dpJudas
 
 
 
Joined: 28 May 2016

Re: Postprocess shaders for sky

Postby Graf Zahl » Thu Mar 08, 2018 12:31 pm

Skies are NOT done in a separate pass, they are drawn into a stencil of the main scene (or, if there's only one portal effect, drawn into the framebuffer before rendering the rest on top of it.
There is no guarantee that there ever is a framebuffer that could be run through the postprocessing logic.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Postprocess shaders for sky

Postby Pixel Eater » Sat Mar 24, 2018 5:06 am

I briefly considered using chroma-keying (as Nash puts it) to recreate the invulnerability bug until it occured to me that I'd have to work out how to rotate and stretch the sky. So there is one way to do it unless you want compatibility with translucent sprites (they look like ass when they get between you and the "green screen").
User avatar
Pixel Eater
I sense evil I fear it here today, Like a bad dream that never goes away -MBerry
 
 
 
Joined: 02 Aug 2017
Location: In between the Moon and you, between the buried and me.

Re: Postprocess shaders for sky

Postby Rachael » Sat Mar 24, 2018 5:30 am

Chroma keying the sky comes with a number of issues beyond just the transparency issues. I do wish the system was a bit more flexible than it currently is.
User avatar
Rachael
QZDoom + Webmaster
 
Joined: 13 Jan 2004

Re: Postprocess shaders for sky

Postby Graf Zahl » Sat Mar 24, 2018 5:53 am

What's the point of chroma keying when you have a real separate stencil value at your disposal?
The main issue here is that the engine has to account for so many possibilities, most importantly that a map can have more than one sky visible at the same time. It's not all that simple.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Postprocess shaders for sky

Postby Pixel Eater » Sat Mar 24, 2018 7:27 am

I'm not sure what a stencil value is? It sounds like something useful :)

ChromaSky.pk3
(35.47 KiB) Downloaded 20 times
I knocked this up anyway just to see it in action. You could further animate it or warp it, but really it needs some rotation and stretching with the mouselook to match the original sky.

It's a "Shader in the Sky with Mountains" :lol:
User avatar
Pixel Eater
I sense evil I fear it here today, Like a bad dream that never goes away -MBerry
 
 
 
Joined: 02 Aug 2017
Location: In between the Moon and you, between the buried and me.

Re: Postprocess shaders for sky

Postby Marisa Kirisame » Sat Mar 24, 2018 8:11 am

Do we have stencil access in pp shaders though?
User avatar
Marisa Kirisame
ZScript Magician
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: Marisa Kirisame#4689
Twitch ID: magusmarisa

Re: Postprocess shaders for sky

Postby Graf Zahl » Sat Mar 24, 2018 9:52 am

Marisa Kirisame wrote:Do we have stencil access in pp shaders though?



Currently not, because the stencil normally gets overwritten right afterward when sprites are being done. In any case, the pp shaders will get to the buffer way too late to do anything useful with it.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 3 guests