aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/README
diff options
context:
space:
mode:
authorGravatar Chris Dalton <csmartdalton@google.com>2018-07-27 12:38:35 -0600
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-07-27 19:04:46 +0000
commit49d14e98fe43fdff818e7571c1a61cd5045fedc0 (patch)
tree18d48cd1922c646b6dafa851fbe214c8904aef87 /src/sksl/README
parentf4f6bbfadac327619a3832acad9c8afe06629b55 (diff)
sksl: Add a "sk_Clockwise" built-in
This allows us to identify clockwise-winding triangles, in terms of Skia device space, in all backends and with all render target origins. Bug: skia: Change-Id: I220e1c459e0129d1cc4dee6458ef94277fbedd21 Reviewed-on: https://skia-review.googlesource.com/142662 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/sksl/README')
-rw-r--r--src/sksl/README4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sksl/README b/src/sksl/README
index bb2dd05396..dd0af9825f 100644
--- a/src/sksl/README
+++ b/src/sksl/README
@@ -45,6 +45,8 @@ Differences from GLSL
* use sk_InstanceID instead of gl_InstanceID
* the fragment coordinate is sk_FragCoord, and is always relative to the upper
left.
+* use sk_Clockwise instead of gl_FrontFacing. This is always relative to an
+ upper left origin.
* you do not need to include ".0" to make a number a float (meaning that
"float2(x, y) * 4" is perfectly legal in SkSL, unlike GLSL where it would
often have to be expressed "float2(x, y) * 4.0". There is no performance
@@ -149,4 +151,4 @@ Creating a new .fp file
7. At this point you can reference the new fragment processor from within Skia.
Once you have done this initial setup, simply re-build Skia to pick up any
-changes to the .fp file. \ No newline at end of file
+changes to the .fp file.