Fix sample count limits in deferredmultisampling

The sample count was previously fixed at 8, which is not supported
on some platforms. The code now checks for the maximum supported
sample count and uses that instead.

If you would prefer the upper limit to be fixed at 8, that is
obviously trivial to change.
This commit is contained in:
Gary Sweet 2019-03-06 12:41:13 +00:00
parent a0adb3cd68
commit 7632def9d6
3 changed files with 23 additions and 7 deletions

View file

@ -8,7 +8,7 @@ layout (location = 0) in vec3 inUV;
layout (location = 0) out vec4 outFragColor;
#define NUM_SAMPLES 8
layout (constant_id = 0) const int NUM_SAMPLES = 8;
vec4 resolve(sampler2DMS tex, ivec2 uv)
{