Pixelated warping effect

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
EmperorGrieferus
Posts: 134
Joined: Wed May 31, 2017 5:39 am

Pixelated warping effect

Post by EmperorGrieferus »

It's probably a dumb question, but I'll ask it regardless.
While watching videos about Doom mods, I've been seeing textures with pixelated warping effect popping up here and there. Is it possible to implement the pixelated warping effect in OpenGL mode?
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: Pixelated warping effect

Post by Gez »

Probably in the same way you'd pixelate anything else in the shader. IIRC by multiplying the [0, 1] coordinate by the image's size, flooring it to get an integer corresponding to a pixel position, then dividing it back by the image size. I think something like that is used by the pixel versions of the partial invisibility shader.
EmperorGrieferus
Posts: 134
Joined: Wed May 31, 2017 5:39 am

Re: Pixelated warping effect

Post by EmperorGrieferus »

Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: Pixelated warping effect

Post by Gez »

EmperorGrieferus wrote: Wed Aug 21, 2024 5:07 am https://youtu.be/OGTL7gBJZL8?si=xld7RD9nj0YL9yt9
It's visible on 1:51
Well in that particular case, you can download the file (the mediafire link still works!) and look at how it's done.

Long story short, they're using ANIMDEFS and TEXTURES to create 64 frames of animations for this. And the whole trick is overlaying two flats together, with transparency for the one on top, and changing their offsets gradually to create that effect of the textures going into two different directions.
EmperorGrieferus
Posts: 134
Joined: Wed May 31, 2017 5:39 am

Re: Pixelated warping effect

Post by EmperorGrieferus »

Gez wrote: Wed Aug 21, 2024 6:49 am
EmperorGrieferus wrote: Wed Aug 21, 2024 5:07 am https://youtu.be/OGTL7gBJZL8?si=xld7RD9nj0YL9yt9
It's visible on 1:51
Well in that particular case, you can download the file (the mediafire link still works!) and look at how it's done.

Long story short, they're using ANIMDEFS and TEXTURES to create 64 frames of animations for this. And the whole trick is overlaying two flats together, with transparency for the one on top, and changing their offsets gradually to create that effect of the textures going into two different directions.
I mean, I know how does warping works. And I even downloaded it. But the problem is that the warping effect works normally there, and it's not pixelated, like it would be in software mode.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: Pixelated warping effect

Post by Gez »

Let's try to communicate more clearly.

Texture warping in GZDoom refers to a very specific effect, which is not what is used on these examples where they manually made 64 frames of animation.

The lack of pixelation is quite unlikely to be caused by animation, regardless of how it is animated. At this point, my best guess is that you have texture filtering on; it should be set to "none (trilinear)".
Last edited by Gez on Thu Aug 22, 2024 5:03 pm, edited 1 time in total.
EmperorGrieferus
Posts: 134
Joined: Wed May 31, 2017 5:39 am

Re: Pixelated warping effect

Post by EmperorGrieferus »

Gez wrote: Thu Aug 22, 2024 9:40 am Let's try to communicate more clearly.

Texture warping [wiki=GLDEFS#Hardware_shaders]in GZDoom[/wiki] refers to [wiki=ANIMDEFS#Warping_graphics]a very specific effect[/wiki], which is not what is used on these examples where they manually made 64 frames of animation.

The lack of pixelation is quite unlikely to be caused by animation, regardless of how it is animated. At this point, my best guess is that you have texture filtering on; it should be set to "none (trilinear)".
Nope, no texture filtering. And in the mod itself there's only WARP2 function, which leaves the question whether or not this moment with pixelated warping was recorded in software mode.
Post Reply

Return to “Scripting”