Famous / Famous/engine

GL textures display checkerboard placeholders of varying duration

Open
#272 4 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
1.7k
Forks
249
PR merge metrics
No merged PRs in 30d

Description

I initially reproduced this issue on Slack as follows:

https://gist.github.com/oldschooljarvis/2011f7d9ea0586c1f059
Just `famous init` a new project and replace `src/index.js` with the above ^

![bugreproduction4-1_01](https://cloud.githubusercontent.com/assets/3048285/8120328/7e32e6b8-1063-11e5-9920-2ac8cbf95199.gif)

The sequence of events is:

`(0ms)` First node is spawned containing a DOMElement utilizing the default logo image.
`(4000ms)` Second node is spawned with a Mesh instead, using the same default logo image but mapped as a GL texture. There is visible checkerboarding on load.
`(8000ms)` Third node is spawned, identical to the second, but does not checkerboard. Ditto all subsequent nodes.

The checkerboarding only manifests itself if it's a fresh page load. It will not manifest upon refreshing the page.
##

Then I created a second reproduction:

https://gist.github.com/oldschooljarvis/031463a0f8cb8fbf3d84
http://i.imgur.com/be3bldF.png/famous_logo_magenta.png (second image)

![bugreproduction4-2_01](https://cloud.githubusercontent.com/assets/3048285/8120506/6bb44232-1065-11e5-8216-b9f42fd1f5ca.gif)

Similar setup, except we eschew the DOM node and deal purely in GL.

Sequence of events is:

`(1000ms)` Spawn node w/ default logo. - Bad checkerboxing, lasts nearly a second.
`(2000ms)` Spawn node w/ default logo again. - Zero checkerboarding.
`(5000ms)` Spawn node w/ modified logo image. - Slight checkerboarding, maybe a couple of frames. **Note: The .gif fails to capture this at all. (.gif limitation)**
`(6000ms)` Spawn node w/ modified logo image. - Zero checkerboarding.

However, if we refresh the page, checkerboarding is eliminated entirely:

![bugreproduction4-2_02](https://cloud.githubusercontent.com/assets/3048285/8120518/952d5310-1065-11e5-8e11-52a9ab0b96a9.gif)
##

The first reproduction demonstrated that the issue isn't related to normal browser image caching.

The second reproduction demonstrated that loading a new GL texture incurs only minor checkerboarding; that subsequent nodes of the same texture don't have the issue, and that the first texture in a scene is always afflicted with the worst checkerboarding. Perhaps the latter behavior is something to do with initialization of the texture system itself? No idea.

These issues were reproduced on Chrome Version 43.0.2357.124 m (64-bit), Windows 8.1. The system I tested on is a 3.8GHz i7 w/ an R9 270. Firefox and IE both exhibit the issue roughly the same. Chrome seems to be the worst for this issue, if only by a small margin.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.