Fill Spectre v3.1

Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
User avatar
Apeirogon
Posts: 1606
Joined: Mon Jun 12, 2017 12:57 am

Re: Fill Spectre v3.1

Post by Apeirogon »

Hey, pixel, I found, not like someone try to hide it, function like a_setrenderstyle. What interesting about it function that it can paint monsters sprite to some color, say pink, without losing sprite "relief" like in this picture.
https://imgur.com/a/IQqqQJx
So, maybe it can be used to make every/some monster on map cloaking without sprite crutches?
User avatar
doomfiend
Posts: 526
Joined: Sun Aug 27, 2006 6:10 am
Location: some where

Re: Fill Spectre v3.1

Post by doomfiend »

omg that would be awesome if that could be done. O_o
User avatar
Pixel Eater
 
 
Posts: 667
Joined: Wed Aug 02, 2017 12:31 am
Location: In between the Moon and you, between the buried and me.

Re: Fill Spectre v3.1

Post by Pixel Eater »

CUBEKid04 wrote:Just a request, could you create a shader for heatwave distortions, say like when an explosion occurs or the after effect seen with fire and stuff, it would be nice to see heatwave distortion effects for like when an explosion occurs.
I've posted a suggestion that would allow for that sort of effect but it requires some heavy modifications to the engine.

Just for fun though here's a different heatwave effect (pour in some lava with a dash of godmode):
Heatwave.pk3
@Apeirogon: I think I might already be using a_setrenderstyle so it can be toggled? I've been working on updates for a bunch of other projects so I'm probably misremembering...

@Doomfiend: I concur :mrgreen:
You do not have the required permissions to view the files attached to this post.
User avatar
Apeirogon
Posts: 1606
Joined: Mon Jun 12, 2017 12:57 am

Re: Fill Spectre v3.1

Post by Apeirogon »

Its easy, just create event with this lines

Code: Select all

override void WorldThingSpawned(WorldEvent e)
{
	if(e.thing.bIsmonster == true)
	{
		e.thing.a_setrenderstyle(1, STYLE_AddShaded); e.thing.SetShade("color in hex notations");
	}
}
to paint monster in some colors.

It also possible change color which shader must "cloak", to match monster color if some custom texture color on map interfere with default shader color.
I try to pick color for you shader by hand, but looks like it hardcoded in it and Im not familiar with shaders enough to change it.
User avatar
Adamast0r
Posts: 56
Joined: Fri May 22, 2020 3:14 am
Graphics Processor: Intel (Modern GZDoom)
Location: Earth

Re: Fill Spectre v3.1

Post by Adamast0r »

This is awesome.
Would it be possible to replicate it on the player when under the effects of a Blursphere?
User avatar
Apeirogon
Posts: 1606
Joined: Mon Jun 12, 2017 12:57 am

Re: Fill Spectre v3.1

Post by Apeirogon »

If someone wants to apply this shader to other sprites, paint them in specific shade of purple. What exactly shade? Open spectre sprite in something that able to show what exactly color mouse cursor currently pointing at on a picture. I used paint.net.
Spectre sprite constructed from pixels with maxed red and blue color channels with variable green channel color through whole sprite, which represent "roughness" of spectre sprite in this context. See picture

"Kinda like purple" colour will not work here, shader designed to "fill" only this specific shade of purple, see picture
User avatar
Cherno
Posts: 1318
Joined: Tue Dec 06, 2016 11:25 am

Re: Fill Spectre v3.1

Post by Cherno »

I tested this shader and the effect broke down when using AA, or when the camouflaged sprite is in front of any other purple pixels. Is this a known limitation?
User avatar
Apeirogon
Posts: 1606
Joined: Mon Jun 12, 2017 12:57 am

Re: Fill Spectre v3.1

Post by Apeirogon »

Anti Aliasing? Anti Aircraft? Ancient Alien?
And yeah, it break with purple pixels.

Return to “Shaders”