Generate a random or fixed LGBTQIA+ flag of your choice

Free Generate a random or fixed LGBTQIA+ flag of your choice 1.2

I've increased the resolution of the flag a bit, from 200 triangles to 450, used a Gaussian curve to do anti-aliasing, and enhanced texture quality. It improved a bit overall, but I'm still not satisfied. However, I found a security bug that I needed to address urgently. If you were using the dynamic version, it was turning wherever OBS runs into a file server... I've fixed it so that the server always runs within the flag directory (which is all the server needs to monitor), preventing potential security breaches. Dynamic-version users may need to change the URL for the file flag.html, but from now on, it will always run from the same place.

Also, the line to set idxFlag for offline-version users is now 368.

Minor discussion: Technically, you should be able to run the flag.html file from any server (if you own a domain or already run a server on your PC), but I haven't tested this yet. However, I will make sure that in future versions this option becomes obvious and doable, so that running an additional service becomes voluntary to achieve the dynamic behavior.
With the option of fixing the flag, it can look like it is hanging from one of the corners of the stream.

Unfortunately, I forgot to discuss aspect ratios when I released the first version.

For now, all flags have a fixed aspect ratio of 3:4 (commonly used for decorative flags). I initially tried to make the AR dynamic, but that didn’t produce good results—especially for flags that have a texture. So for now, I’ve kept it fixed. However, in a later version, I’ll give users the option to change the AR to all common flag ratios: 1:1, 1:2, 2:3, 3:4, 3:5, 5:8, and custom. That way, I can at least guarantee that textures or shapes won’t be deformed on standard aspect ratios.

If you want to try fixing the AR for a flag yourself, I’ve also added comments indicating where you should modify the code (aside from the fragment shader).

PS: On this version, 1.1, you only need to change line 356:
var idxFlag = Number(getParameterByName('num') || '0');

to

var idxFlag = 0; // the Flag id

Yet auto (auto change), fixr (fix right) and fixl (fix left) are above it for convenience if you want to change their behaviour.

Screenshot from 2026-02-19 00-55-18.png

Attachments

  • Screenshot from 2026-02-19 00-56-19.png
    Screenshot from 2026-02-19 00-56-19.png
    101.8 KB · Views: 9
Back
Top