You have access to the particle center and to it's bounding box. Maybe a simple falloff? If it's not too computationally expensive, maybe take a small sample away from the center of each particle and adjust the falloff based on number of hits? Just thinking out loud.
I just did a test and it works OK. I used the distance from the particle center to the max bounding box value as my falloff radius. So I never get a full value of 1 for the outer fish. :(
But if you did the sampling I mentioned earlier, you should be able to set non-occluded fish to a value of 1.
I would upload an image but I don't know how.
By:
manny
[ Editor ]