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
// TODO[Przemek]: REMOVE when READ --> if linestyle value in mainObject is invalid then we're using localTextureColor instead of the linestyle color, this should be true for DTM meshes to resolve color with what's stored in colorStorage and not from the lineStyle color
constbool differentMainObject = currentMainObjectIdx != storedMainObjectIdx; // meaning current pixel's main object is different than what is already stored
// load from colorStorage only if we want to resolve color from texture instead of style
380
377
// sampling from colorStorage needs to happen in critical section because another fragment may also want to store into it at the same time + need to happen before store
381
-
if (resolve && !resolveColorFromStyle)
382
-
color = float32_t4(unpackR11G11B10_UNORM(colorStorage[fragCoord]), 1.0f);
383
-
384
-
if (resolve || localQuantizedAlpha > storedQuantizedAlpha)
if (toResolveStyleIdx == InvalidStyleIdx) // if style idx to resolve is invalid, then it means we should resolve from color
382
+
color = float32_t4(unpackR11G11B10_UNORM(colorStorage[fragCoord]), 1.0f);
383
+
}
384
+
385
+
// If current localAlpha is higher than what is already stored in pseudoStencil we will update the value in pseudoStencil or the color in colorStorage, this is equivalent to programmable blending MAX operation.
386
+
// OR If previous pixel has a different ID than current's (i.e. previous either empty/invalid or a differnet mainObject), we should update our alpha and color storages.
387
+
if (differentMainObject || localQuantizedAlpha > storedQuantizedAlpha)
// TODO[Przemek]: But make sure you're still calling this, correctly calculating alpha and texture color.
651
655
// you can add 1 main object and push via DrawResourcesFiller like we already do for other objects (this go in the mainObjects StorageBuffer) and then set the currentMainObjectIdx to 0 here
652
656
// having 1 main object temporarily means that all triangle meshes will be treated as a unified object in blending operations.
color = float32_t4(unpackR11G11B10_UNORM(colorStorage[fragCoord]), 1.0f);
34
+
// load from colorStorage only if we want to resolve color from texture instead of style
35
+
// sampling from colorStorage needs to happen in critical section because another fragment may also want to store into it at the same time + need to happen before store
0 commit comments