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

Issue 2246463004: Added distance attenuation and diffuse shading to PointLights (Closed)

Created:
4 years, 4 months ago by vjiaoblack
Modified:
4 years, 3 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Added distance attenuation and diffuse shading to PointLights BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2246463004 Committed: https://skia.googlesource.com/skia/+/56f33ea2acb39ebb041340a8ab7564facb95afce

Patch Set 1 #

Patch Set 2 : Added diffuse shading for point lights #

Patch Set 3 : Cleaned up code #

Total comments: 8

Patch Set 4 : Made req changes- made light intensity a light attribute #

Total comments: 22

Patch Set 5 : made req changes; removed the unused isPointLight uni #

Total comments: 31

Patch Set 6 : made some requested changes #

Patch Set 7 : removed unnecessary name strings #

Patch Set 8 : made req changes #

Total comments: 18

Patch Set 9 : made req changes #

Total comments: 3

Patch Set 10 : made one req change #

Patch Set 11 : rebased off of master (with variance shadow mapping) #

Total comments: 17

Patch Set 12 : made req changes #

Total comments: 6

Patch Set 13 : made req changes #

Patch Set 14 : disabled shadows: #

Unified diffs Side-by-side diffs Delta from patch set Stats (+291 lines, -181 lines) Patch
M include/core/SkLights.h View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +28 lines, -14 lines 0 comments Download
M samplecode/SampleShadowing.cpp View 1 2 3 4 5 6 7 8 9 10 11 10 chunks +56 lines, -55 lines 0 comments Download
M src/core/SkLights.cpp View 1 2 3 3 chunks +11 lines, -2 lines 0 comments Download
M src/core/SkShadowShader.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 15 chunks +191 lines, -109 lines 0 comments Download
M src/utils/SkShadowPaintFilterCanvas.cpp View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -1 line 0 comments Download

Messages

Total messages: 44 (14 generated)
vjiaoblack
4 years, 4 months ago (2016-08-12 20:48:39 UTC) #4
vjiaoblack
On 2016/08/12 20:48:39, vjiaoblack wrote: ** Not yet ready for review, sorry!
4 years, 4 months ago (2016-08-12 20:51:14 UTC) #5
vjiaoblack
4 years, 4 months ago (2016-08-12 20:53:45 UTC) #6
jvanverth1
https://codereview.chromium.org/2246463004/diff/40001/src/core/SkShadowShader.cpp File src/core/SkShadowShader.cpp (right): https://codereview.chromium.org/2246463004/diff/40001/src/core/SkShadowShader.cpp#newcode203 src/core/SkShadowShader.cpp:203: kFloat_GrSLType, we have kBool_GrSLType https://codereview.chromium.org/2246463004/diff/40001/src/core/SkShadowShader.cpp#newcode246 src/core/SkShadowShader.cpp:246: "vec2(%s, %s), %s.b ...
4 years, 4 months ago (2016-08-16 01:17:25 UTC) #7
vjiaoblack
I'm leaving the optimization for later - i.e. right now, I'm gonna stick with passing ...
4 years, 4 months ago (2016-08-16 20:33:40 UTC) #8
jvanverth1
https://codereview.chromium.org/2246463004/diff/60001/include/core/SkLights.h File include/core/SkLights.h (right): https://codereview.chromium.org/2246463004/diff/60001/include/core/SkLights.h#newcode102 include/core/SkLights.h:102: SkVector3 fDirection; // For directional lights, holds the direction ...
4 years, 4 months ago (2016-08-17 19:59:02 UTC) #9
vjiaoblack
https://codereview.chromium.org/2246463004/diff/60001/include/core/SkLights.h File include/core/SkLights.h (right): https://codereview.chromium.org/2246463004/diff/60001/include/core/SkLights.h#newcode102 include/core/SkLights.h:102: SkVector3 fDirection; // For directional lights, holds the direction ...
4 years, 4 months ago (2016-08-18 14:52:19 UTC) #10
robertphillips
https://codereview.chromium.org/2246463004/diff/80001/include/core/SkLights.h File include/core/SkLights.h (right): https://codereview.chromium.org/2246463004/diff/80001/include/core/SkLights.h#newcode58 include/core/SkLights.h:58: static Light MakePoint(const SkColor3f& color, const SkPoint3& pos, SkScalar ...
4 years, 4 months ago (2016-08-18 17:12:59 UTC) #11
vjiaoblack
https://codereview.chromium.org/2246463004/diff/80001/include/core/SkLights.h File include/core/SkLights.h (right): https://codereview.chromium.org/2246463004/diff/80001/include/core/SkLights.h#newcode58 include/core/SkLights.h:58: static Light MakePoint(const SkColor3f& color, const SkPoint3& pos, SkScalar ...
4 years, 4 months ago (2016-08-18 18:05:34 UTC) #12
robertphillips
https://codereview.chromium.org/2246463004/diff/80001/src/core/SkShadowShader.cpp File src/core/SkShadowShader.cpp (right): https://codereview.chromium.org/2246463004/diff/80001/src/core/SkShadowShader.cpp#newcode166 src/core/SkShadowShader.cpp:166: On 2016/08/18 18:05:34, vjiaoblack wrote: > On 2016/08/18 17:12:59, ...
4 years, 4 months ago (2016-08-18 18:32:11 UTC) #13
vjiaoblack
https://codereview.chromium.org/2246463004/diff/80001/src/core/SkShadowShader.cpp File src/core/SkShadowShader.cpp (right): https://codereview.chromium.org/2246463004/diff/80001/src/core/SkShadowShader.cpp#newcode166 src/core/SkShadowShader.cpp:166: On 2016/08/18 18:32:11, robertphillips wrote: > On 2016/08/18 18:05:34, ...
4 years, 4 months ago (2016-08-18 19:08:16 UTC) #14
robertphillips
https://codereview.chromium.org/2246463004/diff/80001/src/core/SkShadowShader.cpp File src/core/SkShadowShader.cpp (right): https://codereview.chromium.org/2246463004/diff/80001/src/core/SkShadowShader.cpp#newcode166 src/core/SkShadowShader.cpp:166: On 2016/08/18 19:08:16, vjiaoblack wrote: > On 2016/08/18 18:32:11, ...
4 years, 4 months ago (2016-08-23 13:52:16 UTC) #15
vjiaoblack
4 years, 4 months ago (2016-08-23 14:33:24 UTC) #16
robertphillips
https://codereview.chromium.org/2246463004/diff/140001/src/core/SkShadowShader.cpp File src/core/SkShadowShader.cpp (right): https://codereview.chromium.org/2246463004/diff/140001/src/core/SkShadowShader.cpp#newcode174 src/core/SkShadowShader.cpp:174: for (int i = 0; i < shadowFP.fNumNonAmbLights; i++) ...
4 years, 4 months ago (2016-08-23 16:51:02 UTC) #17
jvanverth1
https://codereview.chromium.org/2246463004/diff/140001/src/core/SkShadowShader.cpp File src/core/SkShadowShader.cpp (right): https://codereview.chromium.org/2246463004/diff/140001/src/core/SkShadowShader.cpp#newcode269 src/core/SkShadowShader.cpp:269: lightDirUniName[i], widthUniName, heightUniName); Could you store 1/w, 1/h in ...
4 years, 4 months ago (2016-08-23 17:25:23 UTC) #18
vjiaoblack
I would like to avoid /adding/ more uniforms etc. to the code, and any nonessential ...
4 years, 4 months ago (2016-08-23 18:28:52 UTC) #19
vjiaoblack
Uploaded new code. My bad
4 years, 4 months ago (2016-08-23 18:30:25 UTC) #20
robertphillips
https://codereview.chromium.org/2246463004/diff/160001/src/core/SkShadowShader.cpp File src/core/SkShadowShader.cpp (right): https://codereview.chromium.org/2246463004/diff/160001/src/core/SkShadowShader.cpp#newcode238 src/core/SkShadowShader.cpp:238: fragBuilder->codeAppendf("vec3 worldCor = vec3(vMatrixCoord_0_1_Stage0 * " Don't need '\n' ...
4 years, 4 months ago (2016-08-23 19:24:51 UTC) #21
vjiaoblack
https://codereview.chromium.org/2246463004/diff/160001/src/core/SkShadowShader.cpp File src/core/SkShadowShader.cpp (right): https://codereview.chromium.org/2246463004/diff/160001/src/core/SkShadowShader.cpp#newcode238 src/core/SkShadowShader.cpp:238: fragBuilder->codeAppendf("vec3 worldCor = vec3(vMatrixCoord_0_1_Stage0 * " On 2016/08/23 19:24:51, ...
4 years, 4 months ago (2016-08-23 20:11:27 UTC) #22
vjiaoblack
4 years, 3 months ago (2016-08-25 17:15:16 UTC) #23
robertphillips
https://codereview.chromium.org/2246463004/diff/200001/samplecode/SampleShadowing.cpp File samplecode/SampleShadowing.cpp (right): https://codereview.chromium.org/2246463004/diff/200001/samplecode/SampleShadowing.cpp#newcode52 samplecode/SampleShadowing.cpp:52: These are now set in ctor list https://codereview.chromium.org/2246463004/diff/200001/samplecode/SampleShadowing.cpp#newcode55 samplecode/SampleShadowing.cpp:55: ...
4 years, 3 months ago (2016-08-25 17:41:43 UTC) #24
vjiaoblack
https://codereview.chromium.org/2246463004/diff/200001/samplecode/SampleShadowing.cpp File samplecode/SampleShadowing.cpp (right): https://codereview.chromium.org/2246463004/diff/200001/samplecode/SampleShadowing.cpp#newcode52 samplecode/SampleShadowing.cpp:52: On 2016/08/25 17:41:43, robertphillips wrote: > These are now ...
4 years, 3 months ago (2016-08-26 12:37:22 UTC) #25
robertphillips
https://codereview.chromium.org/2246463004/diff/220001/src/core/SkShadowShader.cpp File src/core/SkShadowShader.cpp (right): https://codereview.chromium.org/2246463004/diff/220001/src/core/SkShadowShader.cpp#newcode171 src/core/SkShadowShader.cpp:171: // add uniforms use shadowFP here instead of re-casting ...
4 years, 3 months ago (2016-08-26 14:28:28 UTC) #26
vjiaoblack
https://codereview.chromium.org/2246463004/diff/220001/src/core/SkShadowShader.cpp File src/core/SkShadowShader.cpp (right): https://codereview.chromium.org/2246463004/diff/220001/src/core/SkShadowShader.cpp#newcode171 src/core/SkShadowShader.cpp:171: // add uniforms On 2016/08/26 14:28:28, robertphillips wrote: > ...
4 years, 3 months ago (2016-08-26 14:43:39 UTC) #27
robertphillips
lgtm
4 years, 3 months ago (2016-08-26 14:55:29 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2246463004/240001
4 years, 3 months ago (2016-08-26 14:59:56 UTC) #30
vjiaoblack
Heya! Could you (bsalomon) check this over for lgtm-worthiness?
4 years, 3 months ago (2016-08-26 15:18:45 UTC) #33
djsollen
api lgtm
4 years, 3 months ago (2016-08-26 15:48:05 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2246463004/260001
4 years, 3 months ago (2016-08-26 15:48:53 UTC) #42
commit-bot: I haz the power
4 years, 3 months ago (2016-08-26 15:49:50 UTC) #44
Message was sent while issue was closed.
Committed patchset #14 (id:260001) as
https://skia.googlesource.com/skia/+/56f33ea2acb39ebb041340a8ab7564facb95afce

Powered by Google App Engine
This is Rietveld 408576698