-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for model outlining #4314
Merged
Merged
Changes from 37 commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
9f58e9c
Working on drawing highlighted models
jasonbeverage de364e9
Changed demo to be able to modify the highlight size
jasonbeverage cea7291
Better outlining algorithm
jasonbeverage c72757b
Documentation and slight tweaks
jasonbeverage b8a2c44
Changed Cartesian4 to Color
jasonbeverage 6a532d1
Making vertex shader for highlighting more generic, works with animat…
jasonbeverage 2362111
Terrible code for looking up the projection matrix uniform name
jasonbeverage aa759ac
Merge branch 'master' into modelhighlight
jasonbeverage 590bafc
Spelling and added a highlightCommand2D
jasonbeverage 73d9fb2
Comment
jasonbeverage 116bdfc
Moved outline example to it's own sandcastle example and reverted the…
jasonbeverage fa23733
Fix jshint issues
jasonbeverage 751fbda
Added new getUniformNameForSemantic function
jasonbeverage f41bb6e
Changed the highlightSize parameter to be in pixels instead of clip s…
jasonbeverage 36f046d
Simplified highlight shader just using cesium builtins
jasonbeverage d247a65
Merge branch 'master' into modelhighlight
jasonbeverage 32d74a1
Merge branch 'master' into modelhighlight
jasonbeverage af86c9a
Defaulting highlight to true in 3D Models Outline example. Changed h…
jasonbeverage 817da19
Changed highlightColor default to default constructed color and highl…
jasonbeverage a492379
Changed hilightSize default to 2.0 in Model.js and highlightColor to …
jasonbeverage 20a7149
Removed extra whitespace
jasonbeverage d98e0ea
Not setting face in highlightRS, just enabled: false
jasonbeverage aa62d4d
Whitespace
jasonbeverage c2a8ed1
Whitespace
jasonbeverage df36205
Enabling ALPHA_BLEND blending on highlight state
jasonbeverage fa3c2e9
Added opacity slider to 3D Models Outline demo.
jasonbeverage 1bcce58
Explicitly requesting a stencil buffer in the 3D Models Outline demo …
jasonbeverage fee0674
Only rendering highlight commands if stencilBits is greater than 0, o…
jasonbeverage 508b14d
ModelGraphicSpec tests for model highlighting
jasonbeverage 1c33371
Model testing
jasonbeverage bd77f27
Merge branch 'master' into modelhighlight
lilleyse 5f93bf1
Reorganized silhouetting
lilleyse 93d4e68
Prevent divide-by-zero during unpremultiply
lilleyse d7ae242
Issue clear command
lilleyse 5e1e9cf
More accurate translucencly check
lilleyse 246dc83
Fix spec
lilleyse 60caefa
Change order of stencilReference
lilleyse 11fc0da
Doc and stencil clear after ground pass
lilleyse cb35414
No longer hardcoding v_normal
lilleyse 95d024e
Updated CHANGES.md
lilleyse 077e225
Added tests
lilleyse 7a399f2
Merge branch 'master' into modelhighlight
lilleyse File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -589,7 +589,7 @@ define([ | |
// Section 6.8 of the WebGL spec requires the reference and masks to be the same for | ||
// front- and back-face tests. This call prevents invalid operation errors when calling | ||
// stencilFuncSeparate on Firefox. Perhaps they should delay validation to avoid requiring this. | ||
gl.stencilFunc(stencilTest.frontFunction, stencilTest.reference, stencilTest.mask); | ||
gl.stencilFunc(frontFunction, reference, mask); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good eye. |
||
gl.stencilFuncSeparate(gl.BACK, backFunction, reference, mask); | ||
gl.stencilFuncSeparate(gl.FRONT, frontFunction, reference, mask); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've never seen less than 8 (or anything other than 8), but are you sure this is the right test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the context is created without
stencil : true
,gl.getParameter(gl.STENCIL_BITS);
returns 0 so this test should be fine.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get that it is fine in practice (we think), but are you sure that
> 0
isn't more correct according to the spec?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the spec 8 bits is the minimum: https://www.khronos.org/registry/webgl/specs/latest/1.0/#2.2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, thanks for checking.