Commit Graph

10 Commits

Author SHA1 Message Date
robertphillips
943a462fef Minor code cleanup (left over from prior CL)
This was requested in https://codereview.chromium.org/1309543012/ (Add new GM to directly exercise perspective bitmap drawing)

Review URL: https://codereview.chromium.org/1320673011
2015-09-03 13:32:33 -07:00
halcanary
385fe4d4b6 Style Change: SkNEW->new; SkDELETE->delete
DOCS_PREVIEW= https://skia.org/?cl=1316123003

Review URL: https://codereview.chromium.org/1316123003
2015-08-26 13:07:49 -07:00
robertphillips
2f0dbc761a Update SkLightingShader to support rotation
This also:
makes the SkLightingShader handle normal maps where the rects aren't aligned between the diffuse and normal maps.

adds a light aggregating class (Lights) to SkLightingShader (along with a Builder nested class).

Split out of https://codereview.chromium.org/1261433009/ (Add SkCanvas::drawLitAtlas call)

Committed: https://skia.googlesource.com/skia/+/45b59ed6e4e231814dbdb9f707b3d2a7ee50de84

Review URL: https://codereview.chromium.org/1291783003
2015-08-20 05:15:07 -07:00
robertphillips
f7d602a458 Revert "Update SkLightingShader to support rotation"
This reverts commit 45b59ed6e4.

TBR=herb@google.com

Review URL: https://codereview.chromium.org/1304673002
2015-08-19 13:11:23 -07:00
robertphillips
45b59ed6e4 Update SkLightingShader to support rotation
This also:
makes the SkLightingShader handle normal maps where the rects aren't aligned between the diffuse and normal maps.

adds a light aggregating class (Lights) to SkLightingShader (along with a Builder nested class).

Split out of https://codereview.chromium.org/1261433009/ (Add SkCanvas::drawLitAtlas call)

Review URL: https://codereview.chromium.org/1291783003
2015-08-19 10:35:14 -07:00
robertphillips
ea4529d09a Move normal map creation methods to sk_tools
Split off of https://codereview.chromium.org/1261433009/ (Add SkCanvas::drawLitAtlas call)

Review URL: https://codereview.chromium.org/1298763002
2015-08-17 15:04:47 -07:00
bsalomon
ebc1c10fe1 Fix warnings on VS2015 x86_64 build
TBR=bungeman@google.com

Review URL: https://codereview.chromium.org/1276133002
2015-08-06 17:33:16 -07:00
robertphillips
a9652ac09e Address some SkLightingShader TODOs
This CL:
  switches the light colors to be 3 scalars (SkColor3f)
  adds some dox

Review URL: https://codereview.chromium.org/1265983003
2015-07-31 05:17:24 -07:00
robertphillips
640898f588 Update SkLightingShader to take a localMatrix
W/o this we can't draw lit objects anywhere but the origin.

Review URL: https://codereview.chromium.org/1253223003
2015-07-30 05:09:17 -07:00
robertphillips
5f865b9cf1 Move LightingShader to effects
Additionally this CL:

forces the light colors to be opaque
forces the light direction to be normalized
adds a raster implementation
adds a gm

Review URL: https://codereview.chromium.org/1245883003
2015-07-29 12:28:04 -07:00