Fix wrong face culling once and for all (#1277)
* Viewport swizzle support on NV and clip origin * Initialize default viewport swizzle state, emulate viewport swizzle on shaders when not supported * Address PR feedback
This commit is contained in:
parent
83d94b21d0
commit
a15b951721
16 changed files with 202 additions and 53 deletions
|
@ -64,9 +64,22 @@
|
|||
return true;
|
||||
}
|
||||
|
||||
public bool QuerySupportsViewportSwizzle()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public TextureFormat QueryTextureFormat(int handle)
|
||||
{
|
||||
return TextureFormat.R8G8B8A8Unorm;
|
||||
}
|
||||
|
||||
public int QueryViewportSwizzle(int component)
|
||||
{
|
||||
// Bit 0: Negate flag.
|
||||
// Bits 2-1: Component.
|
||||
// Example: 0b110 = W, 0b111 = -W, 0b000 = X, 0b010 = Y etc.
|
||||
return component << 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue