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
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?
Re: Fill Spectre v2 + DooM 64 Sprites
Posted: Fri Dec 08, 2017 12:17 am
by Trusty McLegit
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
Re: Fill Spectre v2 + DooM 64 Sprites
Posted: Fri Dec 08, 2017 4:06 am
by Pixel Eater
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
Re: Fill Spectre v2 + DooM 64 Sprites
Posted: Fri Dec 08, 2017 4:38 am
by NightFright
Absolutely epic. That came out of nowhere and is pretty much the best proof why we all love GZDoom and its possibilities. Respect!
Re: Fill Spectre v2 + DooM 64 Sprites
Posted: Fri Dec 08, 2017 7:42 am
by Pixel Eater
Thanks NightFright, I'm glad you like it
Re: Fill Spectre v2 + DooM 64 Sprites
Posted: Tue Jan 02, 2018 7:47 pm
by ZZYZX
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
Re: Fill Spectre v2 + DooM 64 Sprites
Posted: Tue Jan 02, 2018 10:02 pm
by Pixel Eater
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
Re: Fill Spectre v3
Posted: Tue Jan 09, 2018 4:07 pm
by Pixel Eater
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.
Re: Fill Spectre v3
Posted: Sat Apr 14, 2018 1:44 pm
by Xeotroid
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
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.
Re: Fill Spectre v3
Posted: Sat Apr 14, 2018 4:48 pm
by Pixel Eater
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
Re: Fill Spectre v3
Posted: Sat Apr 14, 2018 5:46 pm
by dpJudas
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.
Re: Fill Spectre v3
Posted: Sat Apr 14, 2018 6:53 pm
by Pixel Eater
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
Re: Fill Spectre v3
Posted: Fri Jun 15, 2018 8:59 pm
by doomfiend
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
Re: Fill Spectre v3
Posted: Fri Jun 15, 2018 9:55 pm
by Pixel Eater
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.
Re: Fill Spectre v3
Posted: Sat Jun 16, 2018 6:41 pm
by doomfiend
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.