This is another issue where the Bible is confusing, but what is clear is that it is the way you rebuke others. If you are doing for their good with loving intentions to show them the errors of their ways and to bring them out of sin and into love, then it is righteous.
If you are condemning people on a message board and telling them to "fuck off" because their beliefs are different then theirs, it is unrighteousness and judgemental.
The thing is, if you truly believe G-d is all knowing, you have to remember, you may be fooling people, but you can't fool G-d, you believe that he is all knowing and so, he will know what is in their hearts and minds. They may be fooling themselves, but according to their own beliefs, they can't fool G-d.
This is what I try to explain to my brother who sees himself as righteous, his judgement is out of pride, believing he is better than others, not out of genuine love and concern for others, but out of superiority.