Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8713461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:21:00+00:00 2026-06-13T05:21:00+00:00

I want to render a plane so that it looks as if it goes

  • 0

I want to render a plane so that it looks as if it goes to infinity in all directions. I want the plane boundary in the distance to be the horizon.

Using a simple mesh does not work – the computer can’t render infinitely many triangles. Even if this was possible, the camera frustum would cut out the distant polygons and create a gap between the plane boundary and the horizon.

A workaround is to compute the horizon mathematically: finding points on the plane, which also lie on the plane at infinity. Connecting these points and two corners of the viewport creates a trapezoid which represents the sought plane. However, this way the plane can not be lit properly, or applied a texture, or anything else which requires a fine triangulation…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T05:21:01+00:00Added an answer on June 13, 2026 at 5:21 am

    You can draw an infinite plane using the standard rasterization pipeline. The homogeneous coordinates it uses can represent “ideal” points (otherwise known as vanishing points or points at infinity) just as happily as regular Euclidean points, and likewise it is perfectly practical to set up a projection matrix which places the far plane at infinity.

    A simple way to do this would be to use one triangle per quadrant, as follows:

    vertices [x,y,z,w], for drawing an (x,y) coordinate plane, at (z==0):
      0: [ 0, 0, 0, 1 ]
      1: [ 1, 0, 0, 0 ]
      2: [ 0, 1, 0, 0 ]
      3: [-1, 0, 0, 0 ]
      4: [ 0,-1, 0, 0 ]
    
    draw 4 triangles using indices:
      (0,1,2); (0,2,3); (0,3,4); (0,4,1)
    

    If you want a test pattern (like an infinite checkerboard), you will have to deal with the fact that stretching your triangles to infinity will distort any standard texture. However, you can write a pixel shader that determines the color based on the actual 3D point (i.e., use x and y from the worldspace (x,y,z) coordinates), ignoring the (distorted) texture coords altogether.

    You could choose between two constant colors based on parity (for a checkerboard), or tile a texture by sampling it based on the fractional part of your chosen coordinates.


    Note that OpenGL’s clip space is [-1..1] for each of x, y, and z. You can compute the appropriate projection matrix by evaluating the limits as far clip distance f increases without bound:

    clip coords: [x]  =  [ n/r             ]  * view coords [x]
                 [y]     [     n/t         ]                [y]
                 [z]     [          -1 -2n ]                [z]
                 [w]     [          -1   0 ]                [w]
    

    Where (as in the link): n is the near clip plane, r is half the frustum width at the near clip plane, and t is half the frustum height at the near clip plane.

    I have not tested the above matrix, so it’s worth what you paid for it. Also be aware that the depth value will lose its precision as you approach infinity…

    Although, the precision at closer distances will be likely be fine — e.g., at any given distance, the depth resolution in the (near:infinity) case should be about 10% less than the case where the (near:far) ratio is (1:10).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a bunch of partials that I want to render horizontally, using form-inline
I want to render the partial view using ajax. When I submit the button,
I want to render a profile user container that contains a list of labels
I want to render a form (fields and includes a submit button) when using
HI, I want to create simple floor plans like this and render it on
I want to render an orthographic projection into texture. The rendering of the mesh
I am using OpenGL to render a model of an object that is rotationally-symmetric
I am using LibVLC and want to render the video pixels in memory so
i want to render one of these sets of views: head body-$id1 foot OR
I want to render for facebook bot special data. I have og.html.erb <!DOCTYPE html><html><head>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.