playMaker

Author Topic: Get texture pixel colour RBG  (Read 2731 times)

Sjones

  • Full Member
  • ***
  • Posts: 203
Get texture pixel colour RBG
« on: August 14, 2013, 10:02:58 AM »
A simple script that will get the pixel colour in the RGB Channels in the form of a float between 0-1

For performance reasons it will not get the nexture every frame, if your texture changes and you need to get the colour from the new texture you will need to exit and re-enter the state (or move onto the next state etc) to get the updated texture.

the per-frame will get the updated coordinates pixel every frame. It works for X horizontal and Y for vertical starting in the bottom left corner of the texture.
« Last Edit: August 14, 2013, 10:09:08 AM by Sjones »