Open pjcozzi opened 10 years ago
@kring any chance you are still game for this for 1.0? Two weeks...
Not likely, sorry.
No worries. Pushing.
This problem has gotten worse, and also now happens in all scene modes. It changes depending on if the geometry is closed or not, so @bagnell thinks it may be related to normal flipping. It's not a showstopper because it's bad in 1.3 as well, but we should look at this soon after 1.4 releases.
Another example of lighting issues in #2399
I think this was auto-closed prematurely. #2515 is listed as only a partial fix.
Just an FYI, something is severely wrong with lighting in master for the sample code in the original post. Hopefully this points to an obvious bug.
3D
2D
I also think this bug is probably intertwined with #1578
Just an FYI, something is severely wrong with lighting in master for the sample code
This is because the sample code doesn't supply the right vertex format to the rectangle
vertexFormat : Cesium.PerInstanceColorAppearance.VERTEX_FORMAT
But why the default vertexFormat (position/normal/st instead of just position/normal) makes it that weird is beyond me.
Thanks @hpinkos can you please update the original post with the correct code.
Came up again: https://groups.google.com/d/msg/cesium-dev/OzfwqMLOr60/BZUlltAfDgAJ
This lighting problem only happens with Primitive
, not GroundPrimitive
CC #4122
CC #4571
This may be the same problem in this post: https://groups.google.com/forum/#!topic/cesium-dev/wb_dzC9Tjuw
Works fine if the height is left undefined.
const ellipse = {
semiMinorAxis : 1000000.0,
semiMajorAxis : 1000000.0,
material : Cesium.Color.WHITE,
shadows: Cesium.ShadowMode.DISABLED,
numberOfVerticalLines: 3,
outline: false,
height: 10,
};
3D:
2D:
The same post @lilleyse linked to above was updated to mention that his problem went away if he forced contextOptions to include the stencil buffer see: http://cesiumjs.org/Cesium/Apps/Sandcastle/?src=Hello%20World.html&label=Showcases&gist=348403bd766c14f97d05bc59dc60e9cd I think this is just a happy accident, but figured I'd mention it here in case it sets off any light bulbs.
Forcing contextOptions to include the stencil buffer doesn't seem to work if height is defined. Not defining height have a major hit on performance for some reason: http://cesiumjs.org/Cesium/Apps/Sandcastle/?src=Hello%20World.html&label=Showcases&gist=e3ebdee8cf5db3192de145e9b2ad9063
Hello @tomermoshe, when using entities, if you define a height it uses a Primitive
to draw the geometry. When you do not define a height, it is using a GroundPrimitive
, which clamps the geometry to the terrain. GroundPrimitive
s are a little more complex to render, which is why you see a decrease in performance when you do not define height.
Created a possible fix #5736
Reported on the forum: https://community.cesium.com/t/colors-appearing-different-between-3d-and-2d/21634/2
Probably due to the multiple sun and moon light sources.
Sandcastle code: