Jump to content
  • Advertisement
Sign in to follow this  

OpenGL Software rasterization NDC questions

This topic is 4276 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!