-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Added shadows property to Cesium3DTileset #4386
Changes from 1 commit
fedb42d
43541c4
c127b75
b99354d
d56251f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -258,6 +258,7 @@ define([ | |
releaseGltfJson : true, // Models are unique and will not benefit from caching so save memory | ||
basePath : this._url, | ||
modelMatrix : this._tile.computedTransform, | ||
shadows: this._tileset.shadows, | ||
vertexShaderLoaded : batchTable.getVertexShaderCallback(), | ||
fragmentShaderLoaded : batchTable.getFragmentShaderCallback(), | ||
uniformMapLoaded : batchTable.getUniformMapCallback(), | ||
|
@@ -303,6 +304,7 @@ define([ | |
// actually generate commands. | ||
this.batchTable.update(tileset, frameState); | ||
this._model.modelMatrix = this._tile.computedTransform; | ||
this._model.shadows = this._tileset.shadows; | ||
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. This looks good, except while testing I noticed that changing the shadows at run time wasn't working because the At https://github.com/AnalyticalGraphicsInc/cesium/blob/3d-tiles/Source/Scene/Cesium3DTileBatchTable.js#L785 add the following lines: derivedCommands.originalCommand.castShadows = command.castShadows;
derivedCommands.originalCommand.receiveShadows = command.receiveShadows;
derivedCommands.back.castShadows = command.castShadows;
derivedCommands.back.receiveShadows = command.receiveShadows;
derivedCommands.front.castShadows = command.castShadows;
derivedCommands.front.receiveShadows = command.receiveShadows; |
||
this._model.update(frameState); | ||
|
||
frameState.addCommand = oldAddCommand; | ||
|
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.
Whitespace, please update in
3d-tiles
branch.