Why is “small feature culling pixel size” a float and not an integer?

Everything about development and the OpenMW source code.
Post Reply
User avatar
Thunderforge
Posts: 477
Joined: 06 Jun 2017, 05:57
Github profile: https://github.com/Thunderforge

Why is “small feature culling pixel size” a float and not an integer?

Post by Thunderforge » 08 Feb 2018, 19:42

The setting small feature culling pixel size is a float. But wouldn’t it make more sense for it to be an integer? If someone set it to 2.5, would it really make sense to cull half a pixel? I had thought that pixels were indivisible.

User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51
Contact:

Re: Why is “small feature culling pixel size” a float and not an integer?

Post by scrawl » 08 Feb 2018, 21:37

This feature doesn't cull the pixels themselves. What it does is compare the size of an object before its rendered to the size of a pixel. You could sensibly configure it to exclude any object that's smaller than 2.5 pixels, for example. Once objects are rendered, their bounds are of course quantized to actual pixels; although if multisampling is used you could still technically have a pixel that is 'half' occupied by an object.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests