Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Learn how to sample a 2D texture and get a weighted randomness value based on an arbitrary color attribute

License

Notifications You must be signed in to change notification settings

llamacademy/read-texture-data

Repository files navigation

Read Texture Data

In this tutorial repostiory you'll learn how to sample a 2D texture and get a weighted randomness value based on an arbitrary color attribute. We're using grayScale value in this specific example, but any r/g/b/a or grayScale can be used.

You will understand how to read texture data at a specific pixel (or group of pixels) and map those back to the coordinate on the texture that you sampled.

In our example here, we sample a progressively larger area over time.

Youtube Tutorial

Patreon Supporters

Have you been getting value out of these tutorials? Do you believe in LlamAcademy's mission of helping everyone make their game dev dream become a reality? Consider becoming a Patreon supporter and get your name added to this list, as well as other cool perks. Head over to https://patreon.com/llamacademy to show your support.

Phenomenal Supporter Tier

  • Andrew Bowen
  • YOUR NAME HERE!

Tremendous Supporter Tier

  • YOUR NAME HERE!

Awesome Supporter Tier

  • Gerald Anderson
  • AudemKay
  • Matt Parkin
  • Ivan
  • Paul Berry
  • Reulan
  • YOUR NAME HERE!

Supporters

  • Bastian
  • Trey Briggs
  • Matt Sponholz
  • Dr Bash
  • Tarik
  • EJ
  • Chris B.
  • Sean
  • YOUR NAME HERE!

Other Projects

Interested in other AI Topics in Unity, or other tutorials on Unity in general?

Socials

Requirements

  • Requires Unity 2021.3 LTS or higher.

About

Learn how to sample a 2D texture and get a weighted randomness value based on an arbitrary color attribute

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project