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
I'm not sure if this is an actual issue or I am using the structs wrong.
What I am doing is the following, which should lead to a black clear:
var clearValue = new ClearValue()
{
Color = new ClearColorValue()
{
Float32_0 = 0,
Float32_1 = 0,
Float32_2 = 0,
Float32_3 = 1,
},
DepthStencil = new ClearDepthStencilValue()
{
Depth = 1.0f,
Stencil = 0
}
};
However, the clear is red and the only way to get it to actually be whatever color is specified in the ClearColorValue is to remove the depth/stencil part. Looking into the Silk structs, I noticed the field offsets do seem odd, as in: They are both 0, so it might end up in arbitrary order when copied?
This is correct. ClearValue should be used to clear one attachment i.e. a color attachment or a depth/stencil attachment. When you begin your render pass you can pass in multiple of these values, intended to correspond with the respective attachments.
That makes a lot of sense and I probably should have read the spec more carefully. :)
The fact that Silk technically does not behave according to spec (values are ignored vs. their presence breaks the intended behavior) is probably acceptable in this case and more of a known idiosyncrasy than something to waste effort on...
I'm not sure if this is an actual issue or I am using the structs wrong.
What I am doing is the following, which should lead to a black clear:
However, the clear is red and the only way to get it to actually be whatever color is specified in the ClearColorValue is to remove the depth/stencil part. Looking into the Silk structs, I noticed the field offsets do seem odd, as in: They are both 0, so it might end up in arbitrary order when copied?
Again, not sure if this is actually an issue or the ClearValue is supposed to only be used with an either/or approach.
The text was updated successfully, but these errors were encountered: