Does GLSL allow any way to transfer information from the shader back to the program? As far as I know, using variables with the qualifier uniform, you can pass information to the shader, but you cannot get it back, as uniform in the shader is read-only. So is there any soboos at all? Maybe writing to a file or some other way to get information from the shader is available?

But the problem is: Steganography Pixel Shader . This is an example of steganography on a shader, in particular, an image extraction algorithm that is hidden in another image.

In my case, the text hides the image, and it would be good, after extracting it from the image, to get back into the program in some way. Hence the question I described above.

  • Yes, you need to render the result to a texture, and after that you can do anything with this texture. - Costantino Rupert
  • By the way, what does this code mean by the link to the algorithm above: varying vec2 texCoord; void main (void) {gl_Position = vec4 (gl_Vertex.xy, 0.0, 1.0); texCoord = 0.5 * gl_Position.xy + vec2 (0.5); } I don't understand why texCoord is calculated this way? but if you just write texCoord = gl_Position.xy, then the result is noise, not a picture. - bayah

1 answer 1

Yes, you need to render the result to a texture, and after that with this texture you can already do anything

PS removed the link because she is beaten