mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-03 11:46:09 +00:00
Metal: Invert CW and CCW because we compile with flip Y
BUG=dawn:43 Change-Id: I6d09118d141046cd307604b1b4d53a82d8d15bf6 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/6761 Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
15d4c2e63b
commit
a32e3bd014
@ -283,10 +283,11 @@ namespace dawn_native { namespace metal {
|
|||||||
}
|
}
|
||||||
|
|
||||||
MTLWinding MTLFrontFace(dawn::FrontFace face) {
|
MTLWinding MTLFrontFace(dawn::FrontFace face) {
|
||||||
|
// Note that these are inverted because we flip the Y coordinate in the vertex shader
|
||||||
switch (face) {
|
switch (face) {
|
||||||
case dawn::FrontFace::CCW:
|
|
||||||
return MTLWindingCounterClockwise;
|
|
||||||
case dawn::FrontFace::CW:
|
case dawn::FrontFace::CW:
|
||||||
|
return MTLWindingCounterClockwise;
|
||||||
|
case dawn::FrontFace::CCW:
|
||||||
return MTLWindingClockwise;
|
return MTLWindingClockwise;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user