Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is extremely useful to take advantage of (that you can store RGB values in 0-alpha pixels). I've written some pretty simple but powerful shaders for a game I'm working on by utilizing transparent pixels' "extra storage" which allowed for either neat visuals or greatly reduced the number of images required to achieve a certain affect. For instance, I wrote a shader for a characters hair that had source images colorized in pure R, G, and B and then mapped those to a set of three colors defining a "hair color" (e.g. R=dark brown, G=light brown, B=brown). If I didn't have the transparent pixels storing rgb nonzero values, the blending between pixels within the image would jagged and the approach would have been unacceptable for production quality leading to each hair style being exported in each hair color. As a total side note I really enjoyed the markup on the website. Seeing the matrices colored to represent their component color value is really helpful for understanding. Nice job author!


Paint Shop Pro had some picture frames that were fully transparent in the middle. As an Easter egg, a couple of those frames had pictures of the staff in those transparent areas and you could use the unerase tool to see them.


Aww, just checked my Paint Shop Pro 4.12 (Build Date: Dec 21 1996) and it doesn't yet have these picture frames :/


That's because 4.12 didn't have partial transparency.


I'm a bit confused about your explanation. Are you using the transparent pixels to store extra data, or are you using the alpha channel to store extra data? And if you're using the transparent pixels, then what data is it and how do your shaders know how to find the transparent pixels?


This is not quite accurate.

In an associated alpha image (aka premultiplied), zero alpha with non-zero RGB represents emission with no occlusion.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: