You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -119,15 +118,15 @@ vec4 nbl_glsl_vTextureGrad_impl(in uint formatID, in vec3 virtualUV, in mat2 dOr
119
118
// are we performing minification
120
119
bool positiveLoD = LoD>0.0;
121
120
// magnification samples LoD 0, else clip to max representable in VT
122
-
int clippedLoD = positiveLoD ?min(LoD_high,originalMaxFullMip):0; // originalMaxFullMip is always -1 in case of no miplevel taking at least 1 full page
123
-
clippedLoD = originalMaxFullMip<0?0: clippedLoD;
121
+
int clippedLoD = positiveLoD ?min(LoD_high,int(originalMaxFullMip)-1):0; // originalMaxFullMip is always -1 in case of no miplevel taking at least 1 full page
122
+
clippedLoD = originalMaxFullMip<1u?0: clippedLoD;
124
123
125
124
// if minification is being performaed then get tail position
126
125
int levelInTail = LoD_high-clippedLoD;
127
126
// have to do trilinear only if doing minification AND larger than 1x1 footprint
0 commit comments