Any ways to mask or crop images dynamically?
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!)
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!)
-
- Posts: 44
- Joined: Mon Aug 01, 2022 11:52 am
Any ways to mask or crop images dynamically?
Just wondering, because the only way to mask, clip, or crop images that I know or involves the TEXTURES lump.
-
- Posts: 537
- Joined: Wed Dec 22, 2021 7:02 pm
- Graphics Processor: Intel (Modern GZDoom)
- Location: Medellin, Colombia
Re: Any ways to mask or crop images dynamically?
Depends what you're trying to do. Maybe a custom shader?
-
- Posts: 443
- Joined: Sat Jun 23, 2012 7:44 am
- Graphics Processor: nVidia with Vulkan support
- Location: Czech Rep.
Re: Any ways to mask or crop images dynamically?
You might be interested in canvases and the related DrawTexture function (it's the same as for drawing on screen) that allows shifting, clipping, scaling, and rotating a texture you draw on it through the tags argument pairs.
Last edited by Xeotroid on Sat Sep 23, 2023 10:00 am, edited 1 time in total.
-
- Posts: 537
- Joined: Wed Dec 22, 2021 7:02 pm
- Graphics Processor: Intel (Modern GZDoom)
- Location: Medellin, Colombia
Re: Any ways to mask or crop images dynamically?
Wow, didn't realize that was possible. Would you take a look at this thread? It's something I solved with a custom shader but maybe you can tell me if there is another/better way?Xeotroid wrote: ↑Thu Sep 21, 2023 7:29 am You might be interested in canvases and the related DrawScreen function (it's the same as for drawing on screen) that allows shifting, clipping, scaling, and rotating a texture you draw on it through the tags argument pairs.
-
- Posts: 44
- Joined: Mon Aug 01, 2022 11:52 am
Re: Any ways to mask or crop images dynamically?
That does look interesting, and I think that will work for what I'm trying to do. Thanks!Xeotroid wrote: ↑Thu Sep 21, 2023 7:29 am You might be interested in canvases and the related DrawScreen function (it's the same as for drawing on screen) that allows shifting, clipping, scaling, and rotating a texture you draw on it through the tags argument pairs.