Thank you for your input, i will have a look at that and for some more articles.
I was thinking to avoid implementing "software rasterization" myself so i used ISOCE library to do the hard work for me.
In this library they use a concept of occluder and occludee. I have found the algorithm for clipping occluder triangles against the view frustum planes in their demo source, so i have done that part (i was doing some tests for decals also) and it works fine. Now (i think) the problem is with occludees, do i have to clip each AABBs 12 triangles also, or can i get proper screen space rectangle by just projecting AABB points with which i find 2d min-max? For occludee in documentation says:
Contains the 2D axis Alined bounding box of the Occluder and a conservative depth (Farthest depth value of the whole occludee)
I think they have 2 mistakes in this statement?
1. Occluder -> Occludee
2. Farthest depth value -> Nearest/closest depth value; would make sense or i miss something?
Any more tips?
Thank you for your time.