There's no way the GPU can know if a return value has previous been used without caching every value and checking each one serially
That's why I need a deterministic (mathematical) function doing it. I don't intend to calculate anything just to store/cache it, I wan't to call a function that always returns the same value for the same inputs, but that value should be nothing continuous or linear but something like "fixed noise".
If I understand you correctly, you're trying to create a screen sized array of unique values which never change, but re-create them each frame in the most inefficient way possible? If that's correct, just calculate it on the CPU and store it in a screen sized texture.
In the most efficient way, not most inefficient. And as I said, calculating anything on the CPU is out of scope here. It has to be done on the GPU, and purely in HLSL. Using any additional textures is not an option either.
If I'm wrong, tell us exactly what it is you're trying to achieve.
Ok, I'll try, although I have to simplify much to avoid writing a novel...
Imagine I wanted to have the entire screen black (ie. no pixels colored), and then highlight one pixel after another, depending on a single variable passed from the CPU to the GPU, holding a value between 0 and 1. Value 0 means all pixels are black, Value 1 means all are highlighted, any value between stands for the percentage of highlighted pixels.
The application (CPU) starts increasing from 0 to 1, so that one pixel after the other will be highlighted. This happens in a "random" or "noisy" way, but still deterministic. For example, the first value larger then 0 (say 0.001) will always highlight the pixel at screen position (0.325, 0.871) with all other pixels remaining black. The second step (e.g. value 0.002), happening for example 0.1 seconds later, will additionally highlight pixel (0.728, 0.523) where the first pixel will remain highlighted - and so on, until the whole screen has been highlighted. At no point during the process (ie. while increasing the passed value), any pixel that had been already highlighted will be black again.
So, at every time (for every value passed from CPU to GPU) it is defined which pixels have to be highlighted (whatever "highlighting" might be, pixel shader wise).
Has that become clear now?