View Single Post
Old 21st June 2020, 22:52   #7
Junior Member
Join Date: Jun 2020
Posts: 10
Thank you the references. I already read them over and over and tried various things before joining the forum, but description of what should happen when using 'aspect.xy' in the statement "ret = tex2D(sampler_main, (uv-0.5)*aspect.xy+0.5).xyz;" does not seem to match what the documentation promises, ie.

"The overall design goal in MilkDrop, concerning aspect ratio, is to fit the preset to the long axis of the window, and to crop the rest, but to do all of this without any stretching or zooming (so all internal canvas pixels map 1:1 to screen pixels).
-per-frame/per-vertex equations:
* multiply XY coords by the values "aspectx" and "aspecty", respectively.
-shader code:
* multiply UV coordinates by 'aspect.xy', prior to using them
to sample a texture, to make the texture fit on the screen properly.
(For example, if the screen is wide, the image will be fitted to cover
the width of the screen, and it will be cropped at the top and bottom.)"

It works perfectly if the source image is square, whatever the output screen ratio, but not for tall or wide images - they are still stretched to fit as if 'aspect.xy' wasn't there. This leads me to suspect there is a bug in the MilkDrop code itself that needs correcting. I am having that checked out.

If I'm wrong, any ideas how to correct the very simple preset I initially attached Nitorami, so it will work with 'texsize.xy' or whatever, for both tall and wide images? I would be very grateful if you could show me how I should change the code in the file.

By the way Nitorami you asked abount the sprites I was working on. I have attached four examples of the sort of things possible with any MilkDrop-based installation. The poor sprite has not had a lot of attention at all it seems. (Not you Prenso!). I 'discovered' it just a year ago - tried a few images, changed the code around a bit and I was staggered at how fabulous it looked in 4K/60fps. Checked out this forum and YouTube and so on - not a great deal there at all. So I set about trying to get the best out of it myself with high-resolution imagery all alone over several months. Just by luck eventually I was introduced to a programmer who happened to be buliding a GUI over MilkDrop, with high-res spout output. I transferred everything I learnt to the new system. We have now worked on the use of sprites to a point where their full potential is being realised.

If you want to know more I wil give more details of how to use Sprites. The message function has also been modernised using some great OFL fonts.
Attached Thumbnails
Click image for larger version

Name:	Sprite - Aztec Mask.jpg
Views:	425
Size:	406.9 KB
ID:	54596   Click image for larger version

Name:	Sprite - Blue Temple Buddha.jpg
Views:	381
Size:	412.6 KB
ID:	54597   Click image for larger version

Name:	Sprite - MMAD Molecule.jpg
Views:	400
Size:	91.0 KB
ID:	54598   Click image for larger version

Name:	Sprite - Taiwanese Dragon.jpg
Views:	458
Size:	576.7 KB
ID:	54601   Click image for larger version

Name:	Sprite - Voodoo Masquerade.jpg
Views:	442
Size:	632.0 KB
ID:	54602  

NeonAngel is offline   Reply With Quote