Original Post
Hello, I''m developing my own sw rasterizer but I don''t properly understand theory behind generating z values. For now, I was computing z value this way: z = ((v.z - mNearPlane) / mFarPlane) where v.z is z coord in view space, but I think it''s not correct because the values differ from that in OpenGL. More I want to store values as 32 bit integer, but how can I indicate if the val is behind the far plane/ in front of near plane? My only idea was to set buffer to negative value...