Fill Spectre v3.1

Re: Fill Spectre v2 + DooM 64 Sprites

Postby Pixel Eater » Thu Dec 07, 2017 4:29 pm

Thanks for the video! I'm curious why the lower left quadrant is remaining fixed. It's as if the shader is centered on the corner of the screen and not the middle :?

Have a go at this one:
FillSpectreDebug.pk3
(133.29 KiB) Downloaded 39 times

I've disabled the section that does the depth calculations so hopefully we can see if that's causing the weird offset. Funnily enough the contour effect seems to have changed, maybe for the better?
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: Fill Spectre v2 + DooM 64 Sprites

Postby Trusty McLegit » Fri Dec 08, 2017 1:17 am

I think it worked... There's a black outline around the sides of the sprite but I assume that's unavoidable? Also, the effect doesn't apply through two or more spectres
User avatar
Trusty McLegit
 
Joined: 07 Feb 2016

Re: Fill Spectre v2 + DooM 64 Sprites

Postby Pixel Eater » Fri Dec 08, 2017 5:06 am

That's super :)

Yeah I suspect the engine adds that outline to graphics with transparencies.
The effect failing when they cross paths is known but I'm confident someone around here with better coding chops than me will figure it out :mrgreen:
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: Fill Spectre v2 + DooM 64 Sprites

Postby NightFright » Fri Dec 08, 2017 5:38 am

Absolutely epic. That came out of nowhere and is pretty much the best proof why we all love GZDoom and its possibilities. Respect!
Last edited by NightFright on Fri Dec 08, 2017 8:50 am, edited 1 time in total.
User avatar
NightFright
 
Joined: 02 May 2008
Location: Germany

Re: Fill Spectre v2 + DooM 64 Sprites

Postby Pixel Eater » Fri Dec 08, 2017 8:42 am

Thanks NightFright, I'm glad you like it :cheers:
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: Fill Spectre v2 + DooM 64 Sprites

Postby ZZYZX » Tue Jan 02, 2018 8:47 pm

For whatever reason the version from the first post broke on my GZDoom g3.3pre-239-g8fce9d9. It only fills properly in 0..1 coords, that is, only upper right quarter of the screen. All others are solid line:
https://i.imgur.com/bpbbjjt.png
User avatar
ZZYZX
le chat du rabbin
 
 
 
Joined: 14 Oct 2012
Location: Ukraine

Re: Fill Spectre v2 + DooM 64 Sprites

Postby Pixel Eater » Tue Jan 02, 2018 11:02 pm

Take a look at the first post of this page, there's a debug version that should fix this problem. If not I have version 3 coming out in a couple of days (provided my house doesn't fall down from these storms!) that does things differently :wink:
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: Fill Spectre v3

Postby Pixel Eater » Tue Jan 09, 2018 5:07 pm

If you can't stand the pixelly look, I'm finding that using XBRZ 4x is working well with a Tolerance(1st) of around .569 as long as the Spectre stays in close range (and they're usually placed to ambush I've noticed). FXAA is good on Low too but I still don't recommend using filtering.
xbrz4.jpg
Spinky.jpg
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: Fill Spectre v3

Postby Xeotroid » Sat Apr 14, 2018 2:44 pm

I don't know if this can be fixed in the shader or it has to be changed in GZDoom itself, but the shader doesn't like sprites with alpha channels rendered in front of Spectres, as seen here: https://streamable.com/b4vv4
Image
Of course, this isn't a problem in vanilla Doom or with old mods that don't have any graphics with alpha channel, I noticed this only when playing mods that do.
User avatar
Xeotroid
 
Joined: 23 Jun 2012
Location: Czech Rep.

Re: Fill Spectre v3

Postby Pixel Eater » Sat Apr 14, 2018 5:48 pm

Yeah it's unlikely that can be fixed- except by turning off translucency. However with the new software fuzz mode there's a chance that this could be duplicated :woh:
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: Fill Spectre v3

Postby dpJudas » Sat Apr 14, 2018 6:46 pm

The new software fuzz mode was made based on the following observations:

1) The fuzz algorithm does two things. It reads slightly above or below the current pixel and it shades it. As it reads the pixels it wrote itself, some pixels appear darker than other pixels (as mentioned by Linguica on DW). This darkening pattern can be calculated, which is exactly what the table is about in fuzz_software.

2) The human eye is a lot better at noticing intensity changes than color. The first thing JPEG does, for example, is to throw away half the color information by downscaling the colors to half the original image. As a result of this, a player is far more likely to notice the shades of the original fuzz than the offsetting of the background itself (the distortion Linguica mentions). OpenGL (and multi-threaded software render) doesn't support reading from the framebuffer like Doom originally did, but it does allow the shade. So by using a new table with just the shade you get something very few people will be able to tell apart from the original effect.

3) The original effect looks wrong/different/shit in any resolution above 320x200. Upscale the effect so it stays looking like it did originally in 320x200. The tricky part here is mostly that the "fuzz pos" advances by how many pixels are drawn in each column - the software fuzz mode gets around this problem by adding some random advancing based on the screen position and the frame rendered.

The alternative version by Linguica cannot be implemented by OpenGL as it essentially attempts to make the distortion more apparent at the cost of a more flat shade. This is precisely the kind of thing you cannot do with OpenGL. The more flat the shade gets, the more the eye can concentrate on the color distortion/intensity change in the background.

Edit: I forgot to mention that the Linguica version somewhat can be approximated by using the technique you do here in Fill Spectre. But ultimately that method has the limitation with transparency and also copying neighboring pixels makes it grab some of the pixels from in front of the spectre.
dpJudas
 
 
 
Joined: 28 May 2016

Re: Fill Spectre v3

Postby Pixel Eater » Sat Apr 14, 2018 7:53 pm

dpJudas wrote:So by using a new table with just the shade you get something very few people will be able to tell apart from the original effect.
Oh, wow. I was totally convinced that the warping was occuring, nice one! :too happy:

dpJudas wrote:Edit: I forgot to mention that the Linguica version somewhat can be approximated by using the technique you do here in Fill Spectre. But ultimately that method has the limitation with transparency and also copying neighboring pixels makes it grab some of the pixels from in front of the spectre.
I actually came close to attempting that before the pleasant surprise of the new software mode. I guess I could have a go at it still, though the borrowing of eclipsing pixels isn't something I'd thought of before :mono:
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: Fill Spectre v3

Postby doomfiend » Fri Jun 15, 2018 9:59 pm

is there a way that the shader can only effect the spectre sprite and not any monster / projectile using the pink / purple colours if one were to use a color translation? take colourful hell as an example. any pink / purple projectile has this odd spectre shader applied
User avatar
doomfiend
 
Joined: 27 Aug 2006
Location: some where

Re: Fill Spectre v3

Postby Pixel Eater » Fri Jun 15, 2018 10:55 pm

There *may* be a way to turn the shader off automatically when there are no Spectres on screen but I can't be sure yet. I'm only just scratching the surface of ZScript now. Even still, the issue would arise again when Spectres are present. To really solve the problem though it would require some modifications to the engine that are beyond my skillset and would require a volunteer with the experience and time. Until someone offers though I will get around to seeing if the first option is possible- I would like to update a lot of my older projects in time.
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: Fill Spectre v3

Postby doomfiend » Sat Jun 16, 2018 7:41 pm

what I'm kind of wondering for a work around would be for the engine to add a new flag like Renderstyle "Fillspectre" and it would apply this warping effect to the sprite and does what it needs on the back-end, or what it could also do is automatically set the sprite colour via translation to magenta / cyan or something and handle it for that actor only if the original sprite with its varying shades / colours mess with the effect. I love the effect if Im doing vanilla stuff but I also love little mods to spice things up from time to time. My mod in particular simply hard uses purple translations to let the player know those are void enemies and purple projectiles / attacks if the player gets hit reverses your controls as if the player has a "confusion" debuff on them for 1-2 seconds unfortunately I had to remove the shader from the mod for now as all purple enemies have an odd effect when present. still though the fact that this was possible to begin with was jaw dropping. I loved it and I wholeheartedly think this is how spectres should be. the current ones we have spectres are extremely easy to see no matter what fuzz style I use. but I've actually had to keep a keen eye out and ears ready for lurking spectre's in dark areas.
User avatar
doomfiend
 
Joined: 27 Aug 2006
Location: some where

PreviousNext

Return to Shaders

Who is online

Users browsing this forum: No registered users and 1 guest