Hello all !
I need to implement simple Job solution to count white pixels in the buffer.
But surprisingly it doesn’t seem to work – “sky_pixels++” results incorrect values.
How to fix it ?
public struct job_counter_t : IJobParallelFor{
public static Color32[] buffer;
public static uint sky_pixels;
public void Execute ( int i ){
Color32 c = buffer[i];
if( c.r==255 && c.g==255 && c.b==255 ){
sky_pixels ++;
}
}
}