Page 8 of 11

Re: Fill Spectre v3.1

Posted: Tue Jul 10, 2018 8:02 am
by Apeirogon
I rewrite "check if spectre in fov" logic. Now shader turns on before player actualy see spectre sprite, if player walk from the corner to spectre.
zscript_spectre_ver7.txt
(11.74 KiB) Downloaded 101 times
I dont know much about shaders, I just say/suggest that I can do so.

Re: Fill Spectre v3.1

Posted: Tue Jul 10, 2018 8:38 am
by Pixel Eater
I rewrite "check if spectre in fov" logic. Now shader turn on before player actualy see spectre sprite, if player walk from the corner to spectre.
It looks good and it hurts my brain :twisted:
I dont know much about shaders, I just say/suggest that I can do so.
It seems like it'd have potential for something...

Re: Fill Spectre v3.1

Posted: Wed Jul 11, 2018 7:55 pm
by Pixel Eater
Updates:
Merged the new fov logic into both versions.
Brought the perspective warping into the alternate version.
Introduced a toggle for the reflectivity because it looks ragged without it at high depth amounts.

Questions:
Is there a way to set all but the closest sprite to TNT1 in the alternate version?
Can the 'setorigin' in 'check_vertex_sight' be used to interpolate the bounding box?

Re: Fill Spectre v3.1

Posted: Thu Jul 12, 2018 4:06 am
by Apeirogon
Closest spectre or spectreS?

And what means interpolate?

Re: Fill Spectre v3.1

Posted: Thu Jul 12, 2018 5:28 am
by Pixel Eater
I've been trying to make it so only the nearest Spectre to the player has the WRAN sprite and all others are TNT1 but nothing I've tried works. This is for the Alt version btw.

I was also wondering, seeing that SetOrigin interpolates between ticks, could it be used with a dummy actor to retrieve smoothing offsets for the vertex data?

I hope I'm making more sense this time :stuppor:

Re: Fill Spectre v3.1

Posted: Thu Jul 12, 2018 7:46 am
by Apeirogon
I've been trying to make it so only the nearest Spectre to the player has the WRAN sprite and all others are TNT1 but nothing I've tried works. This is for the Alt version btw.
Get it. It can be done.
I was also wondering, seeing that SetOrigin interpolates between ticks, could it be used with a dummy actor to retrieve smoothing offsets for the vertex data?
What exactly you want to achive?

Re: Fill Spectre v3.1

Posted: Thu Jul 12, 2018 3:16 pm
by Pixel Eater
Oh good. I think that will tidy up a lot of the visual glitches :)

I'm hoping the bounding box can follow the Spectres faster than 35fps. If RenderOverlay can "SetOrigin" some dummy actors to follow the Spectres around, can it get their position at a smoother rate? Or even a between tick relative offset that can be applied to the known vertices?

Re: Fill Spectre v3.1

Posted: Fri Jul 13, 2018 3:31 am
by Apeirogon
Pixel Eater wrote: I'm hoping the bounding box can follow the Spectres faster than 35fps.
viewtopic.php?f=18&t=59702&hilit=tick

And actualy, after I half done "tnt1 to wran" sprite system, I realize that this way, check distance to CLOSEST player, dont compatible with multiplayer.
Because players can see same spectre from different distantion. For one player it can be closest spectre, while for another not.
So, maybe better change sprite of UNSEEN to player spectres to tnt1!?

Re: Fill Spectre v3.1

Posted: Fri Jul 13, 2018 4:59 am
by Pixel Eater
Apeirogon wrote:Because players can see same spectre from different distantion. For one player it can be closest spectre, while for another not.
That's a really good point I hadn't thought of and definitely means the sprites need to be shrunk back down from their wall-sizedness :?
I so hope Vulkan supports that flag I feature requested :|
So, maybe better change sprite of UNSEEN to player spectres to tnt1!?
That would be awesome and I'm curious to see how you do it :)

Re: Fill Spectre v3.1

Posted: Fri Jul 13, 2018 6:37 am
by Apeirogon
Thats can be done much easily, since it require just adding fev lines to already existing code.
But it....buggy, for some reason.
https://youtu.be/12-Fw2gqcYs
I think this is because size of spectre texture. Can you decrease it to some minimal size, since zscript now can properly turn off/on shader with sprite?
Or maybe "replace sprite" work this like.

I cant fix it, because I dont get what wrong with it, so here it AS IS.
zscript_alt3.txt
(13.16 KiB) Downloaded 109 times

Re: Fill Spectre v3.1

Posted: Sat Jul 14, 2018 9:23 am
by ZZYZX
Apeirogon wrote:
Pixel Eater wrote: I'm hoping the bounding box can follow the Spectres faster than 35fps.
viewtopic.php?f=18&t=59702&hilit=tick

And actualy, after I half done "tnt1 to wran" sprite system, I realize that this way, check distance to CLOSEST player, dont compatible with multiplayer.
Use consoleplayer

Re: Fill Spectre v3.1

Posted: Sat Jul 14, 2018 2:08 pm
by Apeirogon
I know about consoleplayer. I think about desync.
I mean, if at one computer spectre would have tnt1 sprite, and at other same spectre would have wran sprite, this is cause desynchronization, no!?

Re: Fill Spectre v3.1

Posted: Sat Jul 14, 2018 10:08 pm
by Pixel Eater
I mean, if at one computer spectre would have tnt1 sprite, and at other same spectre would have wran sprite, this is cause desynchronization, no!?
Wish I could weigh in but I've got no idea.

I've included the new ZScript and shrunken the sprites to 70x59 (the largest dimensions of the combined sprites, ignoring offsets) and something's a little off. It's now only showing one Spectre at a time.

Re: Fill Spectre v3.1

Posted: Mon Jul 16, 2018 5:46 am
by Apeirogon
SHEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE...
Again?!

I dont know where there are error. I spam console.printf in every line and it print in console AS IT SHOULD. But sprites for some reason still breaks.

Re: Fill Spectre v3.1

Posted: Mon Jul 16, 2018 7:57 am
by Pixel Eater
I've just found the cause, it's in the main shader. I'm trying a work around but it's forcing the lensing back in front of the foreground :|