Postprocess shaders for sky

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Postprocess shaders for sky

Re: Postprocess shaders for sky

by Graf Zahl » Sat Mar 24, 2018 8: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.

Re: Postprocess shaders for sky

by Marisa the Magician » Sat Mar 24, 2018 7:11 am

Do we have stencil access in pp shaders though?

Re: Postprocess shaders for sky

by Pixel Eater » Sat Mar 24, 2018 6:27 am

I'm not sure what a stencil value is? It sounds like something useful :)
ChromaSky.pk3
(35.47 KiB) Downloaded 56 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:

Re: Postprocess shaders for sky

by Graf Zahl » Sat Mar 24, 2018 4: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.

Re: Postprocess shaders for sky

by Rachael » Sat Mar 24, 2018 4: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.

Re: Postprocess shaders for sky

by Pixel Eater » Sat Mar 24, 2018 4: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").

Re: Postprocess shaders for sky

by Graf Zahl » Thu Mar 08, 2018 11:31 am

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.

Re: Postprocess shaders for sky

by dpJudas » Thu Mar 08, 2018 11:28 am

Can't you just use a texture shader for this in a conventional skybox?

Postprocess shaders for sky

by Marisa the Magician » Thu Mar 08, 2018 11:02 am

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.

Top