elm-explorations / webgl

Functional rendering with WebGL in Elm
https://package.elm-lang.org/packages/elm-explorations/webgl/latest/
BSD 3-Clause "New" or "Revised" License
116 stars 17 forks source link

Hot-reloading corrupts shaders #17

Closed MartinSStewart closed 5 years ago

MartinSStewart commented 5 years ago

Sometimes when hot-reloading the webpage, artifacts can get introduced into the scene such as where the red arrow is pointing

webgl_bug

Hot-reloading sometimes also causes entities to not render.

In terms of frequency, the former seems to rarely happen (I delayed posting this issue because I couldn't reproduce it for a couple days) and the latter happens maybe 1 in 5 hot-reloads.

The mesh corruption artifacts don't seem to go away until I do a page refresh while the entities disappearing usually is fixed by doing one or two more hot-reloads.

This is occurring on Chrome both on my Mac and Windows computers. It might have also occurred on Firefox though I might be misremembering as I haven't tested that in a while.

Edit: Now I'm getting the mesh corruption repeatedly. I'm not sure what conditions cause it to happen more frequently.

w0rm commented 5 years ago

@MartinSStewart this could have been solved by https://github.com/elm-explorations/webgl/pull/20

Are you still getting this issue?

MartinSStewart commented 5 years ago

I haven't seen this issue in almost a month. #20 may have fixed it.