Triangle/Hexagon Pixelation Filter
#1
Do you watch a lot of censored porn? Are you tired of always looking at the same square pixelation filter? Boyyy, do I have the solution for you! Introducing the new triangle and hexagon pixelation filters! They do essentially the same thing as the good ol' "Pixelated filter" you know and love from Hotscreen. But instead of using squares for censoring they use triangles and hexagons (duh). I just made these because I think some variety is always fun and keeps things fresh.

I offer you two variations for both of these filters: a static and a dynamic one. The static one is a simple shader. You can edit the size of the triangles/hexagons in Hotscreen and all of them will be the same size. The dynamic variant scales the size of the triangles/hexagons depending on the size of the covered area. This means that the larger the censored area, the larger the triangles/hexagons become. This is essentially equivalent to the "Adapt pixel size" feature that comes with the standard pixelation filter. 

The static variants are straightforward to use: just download the attached .zip file, unpack it and put the included folder in your CUSTOM_DATA folder. Then you can select the filter in Hotscreen and edit the size of the triangles/hexagons in the editor window. The dynamic variants are also included in the folder and also come with their own filter, which you can easily add in Hotscreen. However, to change the size for the dynamic variant you have to open the included .box.tscn file with any text editor and change the "triangle_size" parameter in line 66 or the "hex_size" parameter in line 59. You then have to reload the scene in Hotscreen ("Edit filter">"Select custom scene"). Please note that you have to set larger sizes for the dynamic variants than the static ones, as they are multiplied by a factor between 0 and 1 (meaning they get smaller).

Some technical information for those who are curious

If you take a look at the custom script included in either of the dynamic variants, you will see that the size doesn't actually scale with the covered area, but with the larger of the two sides of the bounding box (i.e. if the covered area is higher than it is wide, then the size scalar will be computed based on the height instead of the width). This is to prevent a quadratic falloff of the size which would make it seem to small on smaller areas and too large on larger areas. The size scalar is then computed as the ratio between the screen side and the bounding box side (i.e. it will be 1 if the bounding box covers the entire screen, otherwise it will be between 0-1). 
You will also notice that i set the shader parameters explicitly when defining the shader material. I tried setting them as a default parameter in the shader code itself, but that resulted in all sizes being the same regardless of the scaling factor. What I do instead is duplicate the material for every instance of a Polygon2D, so they all get their own shader material with their own shader parameter. I am not sure why it has to be done this way, but it works. Setting the size as a default parameter does kinda work if you restart Hotscreen every time you change it, but I deemed that to be too much work (also I can't have you see something uncensored as you are restarting Hotscreen, right? Betas have to stay censored at all times!)

You are free to do with this code whatever you want. The shader code itself was written by Gemini. The script for dynamically scaling the size was largely written by me with some help from Gemini, so I would appreciate it if you gave credit if you decide to use that for your own filters/mods.
Feel free to post a reply or message me if you find any bugs (though I can't promise I'll be able to fix them)!

I hope you have some fun with these filters and stay censored, Betas!


Attached Files
.zip   HexagonPixelation.zip (Size: 6.65 KB / Downloads: 60)
.zip   TrianglePixelation.zip (Size: 6.75 KB / Downloads: 53)
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)