Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Unified Diff: src/core/SkLightingShader.cpp

Issue 2032263004: Add ability to rotate light direction in drawLitAtlas Sample slide (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samplecode/SampleLitAtlas.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkLightingShader.cpp
diff --git a/src/core/SkLightingShader.cpp b/src/core/SkLightingShader.cpp
index cb25944a01fc9e4e9dfff5442a965a04c0ffecbf..d011712feac5130fdcb67a3b61878d7c575e15a4 100644
--- a/src/core/SkLightingShader.cpp
+++ b/src/core/SkLightingShader.cpp
@@ -510,8 +510,8 @@ void SkLightingShaderImpl::LightingShaderContext::shadeSpan(int x, int y,
xformedNorm.fX = lightShader.fInvNormRotation.fX * norm.fX +
lightShader.fInvNormRotation.fY * norm.fY;
- xformedNorm.fY = lightShader.fInvNormRotation.fX * norm.fX -
- lightShader.fInvNormRotation.fY * norm.fY;
+ xformedNorm.fY = -lightShader.fInvNormRotation.fY * norm.fX +
+ lightShader.fInvNormRotation.fX * norm.fY;
xformedNorm.fZ = norm.fZ;
SkColor diffColor = SkUnPreMultiply::PMColorToColor(tmpColor2[i]);
« no previous file with comments | « samplecode/SampleLitAtlas.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698