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: 503
Joined: 06 Jun 2017, 05:57

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

Post by Thunderforge »

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

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

Post by scrawl »

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