dvonbeck
6af677ff8f
Changed SkLightingShader API to take in a shader as color source
...
This CL's base is the CL for the same modification, but in the implementation side: https://codereview.chromium.org/2062703003/
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2064153002
Review-Url: https://codereview.chromium.org/2064153002
2016-07-10 18:38:34 -07:00
dvonbeck
5b794fad18
API change to allow for NormalSource selection at the user level.
...
This CL's base is the CL for CPU handling: https://codereview.chromium.org/2050773002/
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2063793002
Review-Url: https://codereview.chromium.org/2063793002
2016-07-06 13:58:36 -07:00
robertphillips
71e0552793
Make use of new SkLights class
...
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2026763002
Review-Url: https://codereview.chromium.org/2026763002
2016-05-31 12:08:25 -07:00
halcanary
9d524f22bf
Style bikeshed - remove extraneous whitespace
...
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1842753002
Review URL: https://codereview.chromium.org/1842753002
2016-03-29 09:03:53 -07:00
reed
fe63045f07
move setshader to sk_sp, re-using SK_SUPPORT_LEGACY_CREATESHADER_PTR
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1829303002
Review URL: https://codereview.chromium.org/1829303002
2016-03-25 09:08:00 -07:00
msarett
d15750c0c7
Remove uses of SkImageDecoder from samplecode
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1812323003
Review URL: https://codereview.chromium.org/1812323003
2016-03-18 15:48:49 -07:00
halcanary
96fcdcc219
Style Change: NULL->nullptr
...
DOCS_PREVIEW= https://skia.org/?cl=1316233002
Review URL: https://codereview.chromium.org/1316233002
2015-08-27 07:41:16 -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
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
wangyix
7c157a9888
Added GrGLFragmentProcessor::EmitArgs struct for use with emitCode()
...
BUG=skia:
Review URL: https://codereview.chromium.org/1251173002
2015-07-22 15:08:53 -07:00
robertphillips
3d32d768cd
Add new SkPoint3 class
...
The existing Light filter and the upcoming Lighting Shader both need a Point3 class
Review URL: https://codereview.chromium.org/1229693009
2015-07-13 13:16:44 -07:00
jvanverth
d17a32966a
Add normal map sample
...
This adds an example of an SkShader that does normal
mapping. It has a single directional light and an
ambient light.
Committed: https://skia.googlesource.com/skia/+/8e0da72ba890de395c9946ec6639c9e1e7b16027
Review URL: https://codereview.chromium.org/1212813009
2015-07-09 09:04:16 -07:00
robertphillips
426388eeb7
Revert of Add normal map sample (patchset #6 id:100001 of https://codereview.chromium.org/1212813009/ )
...
Reason for revert:
Compilation failures:
../../../../../samplecode/SampleLighting.cpp:13:18: fatal error: SkGr.h: No such file or directory
Original issue's description:
> Add normal map sample
>
> This adds an example of an SkShader that does normal
> mapping. It has a single directional light and an
> ambient light.
>
> Committed: https://skia.googlesource.com/skia/+/8e0da72ba890de395c9946ec6639c9e1e7b16027
TBR=reed@google.com ,bsalomon@google.com,jvanverth@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1230603002
2015-07-08 14:46:12 -07:00
jvanverth
8e0da72ba8
Add normal map sample
...
This adds an example of an SkShader that does normal
mapping. It has a single directional light and an
ambient light.
Review URL: https://codereview.chromium.org/1212813009
2015-07-08 14:21:47 -07:00