Age Verification
This website contains age-restricted material including nudity and explicit content. By entering, you confirm being at least 18 years old or the age of majority in the jurisdiction you are accessing the website from.
I am 18+ or older - Enter
I am under 18 - Exit
Our parental controls page explains how you can easily block access to this site.

Derniers messages - Page 281

  Forum

TheEmu
Inscrit en Jul 2012
7424 message(s)

Discussions for Scenes for Version 1.2.X Fullscreen Mode here

Tout sur iStripper
24 January 2023, 5102 réponses
Won't that change on every frame/pixel ?

Yes it will.

There is no easy solution available in iStripper other than one based on selecting a random texture from a folder of textures.

What is really needed for this sort of things is a "compute shader". The GLSL graphics pipe line comprises roughly the following series of "shader" stages executed in the following order

    Initialise
    Compute
    Geometry
    Vertex
    Fragment

where each acts on the output of the previous stage and handles it in increasing detail.

The .scn file is handled at the Initialise and Compute stages (Animate clauses need actions after the initialise stage) providing data that is then used to compute the scene's geometry. The scene is then divided into a set of triangles each with three vertexes and each triangle divided into pixels each of which is handled as a fragment.

iStripper allows us to provide our own shaders for the vertex and fragment stages, but only allows us to provide limited data inputs to the compute and geometry stages.

It would be nice if iStripper provided more standard data via uniform variables - such as the date, time of day and mouse position etc. For example I have a set of clocks I would like to use as screen savers and it would be nice if they showed the correct time.

Another thing I would really like to see (but which I doubt will ever be implemented) is to be able to do simple calculations in the .scn file - with these calculations having access to such data as the date and time and to a few functions like sin(), cos() and rand().

ADDENDUM:

I suppose you could use one of Z22's feedback buffers to cache a calculation. A shader could be used to generate a copy of this "cache" for use next time or to generate its value if that old value was 0.0. But this would be far from a simple solution.
TheEmu
Inscrit en Jul 2012
7424 message(s)

Discussions for Scenes for Version 1.2.X Fullscreen Mode here

Tout sur iStripper
23 January 2023, 5102 réponses
The ways I have seen for getting random numbers for use in shaders are

    1) Use a texture that consists of random noise, use the elapsed time to select a point within that texture and then either use the value of the corresponding pixel or some function of it as a random number. At first sight you might think that this would create the same sequence of values each time but there is enough variation in the "start-up" time for a scene to overcome this predicability.

    2) Just use a complex function of the least significant digits of a high multiple of the elapsed time. Or of the fractional part of such a function.

    3) Use something based on a random selection of a texture from a folder full of textures and name this foder rather than a specific texture in a Texture: statement in the .scn file.

    4) Instead of a random image use a randomly selected clip as the source of the texture used by the shader. This way you can expand the selection of random textures to include your whole iStripper collection.


These all boil down to one of

    1) Use a randomly selected image of some sort as your source of randomness

    2) Use the least significant bits of the elapsed time as your source of randomness. The variability of a scene's startup times and timing jitter when running stop this being predictable.

Or you can combine them.

Then use a function to amplify that randomness. For use in iStripper scenes you do not need a high grade random number generator.

If you want to generate a whole series of random numbers for a single output image then you can use the pixel co-ordinates as inputs to the "randomness amplifier".