Skip to content
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

Texture coordinates incorrect for rotated ellipse with rotated texture #3851

Closed
hpinkos opened this issue Apr 14, 2016 · 4 comments
Closed

Comments

@hpinkos
Copy link
Contributor

hpinkos commented Apr 14, 2016

The texture coordinate is wrong for one of the outer vertices when a rotation and a stRotation are used.

var viewer = new Cesium.Viewer('cesiumContainer');
var scene = viewer.scene;

scene.primitives.add(new Cesium.Primitive({
    geometryInstances : [new Cesium.GeometryInstance({
        geometry : new Cesium.EllipseGeometry({
            center : Cesium.Cartesian3.fromDegrees(1.52278, 45.00838),
            semiMajorAxis: 5000, 
            semiMinorAxis: 5000, 
            rotation : Cesium.Math.toRadians(-168), 
            stRotation : Cesium.Math.toRadians(168), 
            granularity: Cesium.Math.toRadians(10),
            vertexFormat : Cesium.EllipsoidSurfaceAppearance.VERTEX_FORMAT
        }),
        attributes: {
            color: Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.RED)
        }
    })],
    appearance : new Cesium.DebugAppearance({
        attributeName: 'st'
    })
}));

scene.camera.setView({
    destination: Cesium.Rectangle.fromDegrees(1.4, 44.9, 1.6, 45.1)
});
@mramato
Copy link
Member

mramato commented Apr 14, 2016

Could this be the same root cause (or at least same logic bug) that causes #3172?

@hpinkos
Copy link
Contributor Author

hpinkos commented Apr 14, 2016

Not exactly. It's probably more related to #2737, but I think the solution for the rectangle rotation will be way different.

@bagnell
Copy link
Contributor

bagnell commented Oct 18, 2016

I couldn't reproduce this in 1.26.

@hpinkos
Copy link
Contributor Author

hpinkos commented Oct 18, 2016

Yep, this appears to be fixed.

This is what it looked like in 1.20
image
And this is what it looks like now:

image

@hpinkos hpinkos closed this as completed Oct 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants