Page MenuHome

Occasional off-by-one errors in renderborder
Closed, ResolvedPublic


System Information

Blender Version
Broken: from 2.73a to latest buildbot (8cf8679)
Worked: 2.72b

Short description of error

In camera view, the rendered region is sometimes offset from the renderborder by one pixel:

As far as I can tell, this only occurs in camera view.

Exact steps for others to reproduce the error

  1. Start blender
  2. Switch to camera view, set a render border (smaller renderborders tend to be more susceptible, but it can happen to sizeable renderborders too)
  3. Carefully zoom in and out while watching the border edges for 1 pixel gaps

Revisions and Commits

Event Timeline

Ellwood Zwovic (gandalf3) raised the priority of this task from to 90.
Ellwood Zwovic (gandalf3) updated the task description. (Show Details)
Ellwood Zwovic (gandalf3) edited a custom field.

Can confirm, also on Archlinux with 2.77a.

Seems like the rendered region is defined at float precision whereas the border is positioned at int precision via sboxdraw which uses glVertex2i. Apparently the int precision was introduced a few years ago when (i guess) the rendered region was defined differently as well (rBS37ff3).

Switching back to using glVertex2f via fboxdraw yields nice results, but i'm not sure if i am missing something.

Oh well Campbell did fix it already ;)