SetMultisample sets the number of multisampling to decrease aliasing 4 is typically sufficient. Values must be power of 2.
(nsamp int)
| 221 | // SetMultisample sets the number of multisampling to decrease aliasing |
| 222 | // 4 is typically sufficient. Values must be power of 2. |
| 223 | func (im *ImageFormat) SetMultisample(nsamp int) { |
| 224 | ns := vk.SampleCount1Bit |
| 225 | switch nsamp { |
| 226 | case 2: |
| 227 | ns = vk.SampleCount2Bit |
| 228 | case 4: |
| 229 | ns = vk.SampleCount4Bit |
| 230 | case 8: |
| 231 | ns = vk.SampleCount8Bit |
| 232 | case 16: |
| 233 | ns = vk.SampleCount16Bit |
| 234 | case 32: |
| 235 | ns = vk.SampleCount32Bit |
| 236 | case 64: |
| 237 | ns = vk.SampleCount64Bit |
| 238 | } |
| 239 | im.Samples = ns |
| 240 | } |
| 241 | |
| 242 | // NSamples returns the integer number of samples based on Samples flag setting |
| 243 | func (im *ImageFormat) NSamples() int { |
no outgoing calls
no test coverage detected