Jump to content

blur on transparent texture


marcelluss

Recommended Posts

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 :D - below is an example of what exactly I wanted to implement.

qrUQjNO8V7A.jpg?size=509x349&quality=96&

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
  • 4 months later...
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 :D - below is an example of what exactly I wanted to implement.

qrUQjNO8V7A.jpg?size=509x349&quality=96&

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...