npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

com.sasaki.pixelfinder

v1.0.8

Published

A Compute Shader tool for counting pixels from a Unity Camera

Downloads

6

Readme

hero image

A unity package that leverages compute shaders to analyze a RenderTextures for specific pixel types.

Intro 👋

Features 🤖

  • The PixelFinder object that handles the communication between scene data to the GPU
  • The PixelFinderLayout base object that can setup finder objects in different formations (PixelFinderCube, PixelFinderHorizontal, PixelFinderOrtho)
  • The PixelFinderSystem object that manages groups of layouts and supports working through a list of points to analyze from.
  • Pixel data processed with compute shaders and stored back in the CPU for future use.
  • HLSL code for visualizing data without creating additional CPU overhead
  • Handy extension methods for capturing screen shots or normalizing values

The Pixel Finder

The main purpose of this package was to create a system that could move through a series of points and calculate the amount of pixels that matched a givent set of colors and store those colors for some of our analysis tools. The PixelFinder object is the main component in this package as it brings all of the magic from the GPU to CPU. It Each time the GPU receieves a RenderTexture to read through it goes through a set of steps to find the specified colors.

Pixel Data 📷

When there is a pixel match there is reprojection step to set a value to the pixel in relationship to where it's positioned on the screen. Usually a pixel dead center of a texture would be of more value than one that is off to the side somewhere. 🎯

pixel match

During runtime the pixel data is stored as an uint value type. Once the analysis is complete, the values are casted to an int value type to meet CLS Complaint. ✅

Layouts and Systems

How the system works and reports data.

Some info about how the layouts types work.

Layout types to go in detail about

  • Cube
  • Horizontal
  • Noraml
  • Ortho

Installing

This package requires Unity 2021.x +

This pacakge can be installed in couple of different ways. I recommend for most users going with OpenUPM to add the package to your unity project.

OpenUPM

installed using OpenUPM's CLI

$ openupm add com.sasaki.pixelfinder

Git Package

how to link the file with git URL

Git Fork

how to fork this repo and referencing to disk

Examples

Here are some handy examples that show how to use the package in your own unity project

Running with the editor

info about setting up a scene!

Using a Point Cloud

info about using a point cloud

Extending the System or Layouts

info about coding up some stuff!

Using the UI

info about using raw images and data types

Sasaki

This package is licensed and supported by Sasaki Associates

Logo