Overkillz Posted June 8, 2020 Share Posted June 8, 2020 (edited) Hello dear community, I would like to ask if there is a way to limit the draw size to a texture ? What do I mean, well, I have a texture (A rectangle with rounded corners) Spoiler well, I want to create an animation. A circle that becomes to a rectangle with BORDER CORNERS I think I luckily did this script like 4 years ago, but no idea how I did it (I know trat it sounds absurd.) If im not wrong, I used a shader, and I think it was the HUD Mask Shader: https://nightly.multitheftauto.com/files/shaders/shader_hud_mask.zip I would like to get any tip or suggestion to start to code the animation, but Im fully stuck. All the prerequesites were made like creating the RT, restore in case of minimzeing ...etc Thanks for reading, best regards. Edited June 8, 2020 by Overkillz Link to comment
Moderators IIYAMA Posted June 8, 2020 Moderators Share Posted June 8, 2020 (edited) 40 minutes ago, Overkillz said: I would like to get any tip or suggestion to start to code the animation, but Im fully stuck This rectangle exist out of 7 parts. - 4 corners - 1 big rectangle, the middle, from left to right - 2 small rectangles, top and bottom You can animate the big rectangle it's width and height. (+ Position, if not animated from left-top) The 2 small rectangles, their width and position. And the corners, their position. But make sure to align the components perfectly with the pixels on the screen. Half pixels might cause artifacts. Edited June 8, 2020 by IIYAMA 1 Link to comment
Overkillz Posted June 8, 2020 Author Share Posted June 8, 2020 @IIYAMA Thanks for your suggestion, but, Im not going to reach the effect that Im looking for cuz I think the effect will be notable and not fancy while reaching the corners and the effect im looking for is that a circle over draw the "Rounded rectangle" I think i have explained pretty bad so I just made a quicky image to take it as reference. As you can see, some parts of the circle already left the rectangle (It won't be visible). Spoiler Otherwise, is there a way to load .svg on MTA ? Thanks in advance, best regards. Link to comment
Moderators IIYAMA Posted June 8, 2020 Moderators Share Posted June 8, 2020 29 minutes ago, Overkillz said: Otherwise, is there a way to load .svg on MTA ? In the browser yes. 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now