Sign in to follow this  
Sergi

OpenGL Software rasterization NDC questions

Recommended Posts

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this