3

For the effect I want to create, I need to get pixel color information from the screen texture. The texture sampler patch doesn't do it for me because I want to sample many points and I also didn't find a way to send its output to the script (Output is ShaderGeneric, which I can't convert to an accepted "To-script" parameter).

Is the texture data somehow accessible via code? TextureBase contains a signal field, which returns a ShaderSignal. What is that? Does it contain texture data? I couldn't find clarifying documentation on it.

It would be awesome if someone could help me with this!

Alex Bravo
  • 1,601
  • 2
  • 24
  • 40
vzrd
  • 31
  • 2

2 Answers2

0

No it is not possible. The texture data is stored on the GPU, and there is no way in Spark to read this data from the GPU to the CPU for scripting purposes.

JackKalish
  • 1,555
  • 2
  • 15
  • 24
-1

I met the same problem and then realized that it is not necessary to use patch editor to send inputs to script. It can get data directly by loading modules. For example: https://sparkar.facebook.com/ar-studio/learn/documentation/reference/classes/texturesmodule/ Hope it will work with you.