Software rasterization NDC questions

Started by
-1 comments, last by Sergi 17 years, 5 months ago
Hi all, I'm implementing an occlusion system using a software rasterizer. If I rasterize a line from V0-V1 (both points in normalized device coordinates) V0 = {1.0,0.0,0.5} V1 = {1.0,1.0,0.5} 1. How many pixels must I raster? I think 0 pixels because both vertices are outside the viewport, but theoretically the vertices are inside the viewing volume... 2. What convention do OpenGL and Direct3D use in this case? For example, if we use viewport width=32, viweport height=32, originx=0 and originy=0: Vx' = origin_x + (width) * (V.x + 1) / 2; Vy' = origin_y + (height) * (-V.y + 1) / 2; (direct3d viewport equations) V0' = { 32, 0 } V1' = { 32,32 } Thanks in advance for your time, Sergi

This topic is closed to new replies.

Advertisement