question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

splitLongitude produces NaN texture coordinates

See original GitHub issue
worldRectangle = scene.primitives.add(new Cesium.Primitive({
        geometryInstances : new Cesium.GeometryInstance({
            geometry : new Cesium.RectangleGeometry({
                rectangle : Cesium.Rectangle.fromDegrees(-180.0, -90.0, 180.0, 90.0),
                vertexFormat : Cesium.EllipsoidSurfaceAppearance.VERTEX_FORMAT
            })
        }),
        appearance : new Cesium.EllipsoidSurfaceAppearance({
            aboveGround : false
        }),
        show : false
    }));

I’ve discovered that the texture coordinates attribute has NaN’s in it. If I put the following check in Source/Core/AttributeCompression.js everything works fine:

https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Core/AttributeCompression.js#L308-L316

if (isNaN(textureCoordinates.x) || isNaN(textureCoordinates.y)) {
       return 0;
}

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:19 (18 by maintainers)

github_iconTop GitHub Comments

1reaction
hpinkoscommented, Dec 12, 2018

We have so many problems caused by that splitLongitude function. @OmarShehata keep poking around at it and let me know if you get stuck. My guess would be something’s going weird in this function: https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Core/GeometryPipeline.js#L1919

0reactions
hpinkoscommented, Dec 13, 2018

Just kidding, the GroundPrimitive texture thing is unrelated to splitLongitude. I’m going to open a separate issue. We’ll keep this one for fixing the NaN thing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NAN UV Coordinates/Collapsed Single Point UV Unwrapping
I'm having an issue with a mesh I've been working on where some newly added geometry will not unwrap and texture correctly. So...
Read more >
_texture_funcBackward returns nan values in cube mode ...
The root cause of the issue is attempting to fetch from a cube map using all-zero texture coordinates in the background pixels.
Read more >
Display map latitude and longitude data - MATLAB geoshow
This MATLAB function projects and displays the latitude and longitude vectors lat and lon using the projection stored in the current axesm-based map ......
Read more >
textureProj in GLSL gives nan and inf - Stack Overflow
i'm creating an OpenGL texture and a framebuffer and associated objects GLuint frameBuffer = 0, colorBuffer, depthBuffer; ...
Read more >
Image Analysis — CASAdocs documentation - Read the Docs
CASA Images¶. CASA images are stored as tables and can be accessed with CASA tasks and tools. Image metadata can be listed and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found