marcelluss Posted February 11, 2022 Share Posted February 11, 2022 Hello, I have been tormented for a long time by a question related to blurring, namely on texture. I tried many methods to implement blur on a graphic element, but they all failed, and the fact is that in all shaders or resources, the player's screen is used for the blur texture and a shader is applied to it. And if you apply a blur to a transparent texture, then the blur will not work, and a black texture will be in the background in its place. After reading a lot of information on the implementation of blurring on different sources, I realized that blurring works in such a way that several images are taken that overlap each other and the transparency and position of the texture change and thus the blur effect is created, but here's the catch is it possible to implement this through a shader at all? Namely, to apply a blur to a transparent texture? Because I needed to create a 3d transparent image on which a blur will be superimposed and so that looking at the picture you can see the background behind it from the map well, this is more specific - below is an example of what exactly I wanted to implement. As you could see in the picture you can see a blurred box with glass effect blur, I need to do the same blur on a 3d element, but again, how can I apply a blur if the texture is transparent? Link to comment
STRANGEROUS Posted June 26, 2022 Share Posted June 26, 2022 I tried to do that some time ago, its not hard, just tell the image to get the blur shader and adapt it to the size you can also use dgs for that Link to comment
AngelAlpha Posted June 26, 2022 Share Posted June 26, 2022 On 11/02/2022 at 20:51, marcelluss said: Hello, I have been tormented for a long time by a question related to blurring, namely on texture. I tried many methods to implement blur on a graphic element, but they all failed, and the fact is that in all shaders or resources, the player's screen is used for the blur texture and a shader is applied to it. And if you apply a blur to a transparent texture, then the blur will not work, and a black texture will be in the background in its place. After reading a lot of information on the implementation of blurring on different sources, I realized that blurring works in such a way that several images are taken that overlap each other and the transparency and position of the texture change and thus the blur effect is created, but here's the catch is it possible to implement this through a shader at all? Namely, to apply a blur to a transparent texture? Because I needed to create a 3d transparent image on which a blur will be superimposed and so that looking at the picture you can see the background behind it from the map well, this is more specific - below is an example of what exactly I wanted to implement. As you could see in the picture you can see a blurred box with glass effect blur, I need to do the same blur on a 3d element, but again, how can I apply a blur if the texture is transparent? It seems to me that there is no blur on the square, it is just gray and not transparent. And to make such a 3d effect, use dxSetShaderTransform shader for blur blur_box | Multi Theft Auto | Community 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