Repository navigation
add attribute unpacking code for gl-native - #4363
Conversation
| #ifdef MAPBOX_GL_NATIVE | ||
| mediump vec2 a_pos = a_pos_offset.xy; | ||
| mediump vec2 a_offset = a_pos_offset.zw; | ||
| #endif |
There was a problem hiding this comment.
Should it be explicitly mediump?
| attribute vec4 a_data; | ||
|
|
||
|
|
||
|
|
| attribute vec2 a_pos; | ||
| attribute vec2 a_offset; | ||
| #endif | ||
|
|
There was a problem hiding this comment.
Should we just switch to packed representation for both JS & Native at the same time instead of adding an ifdef?
| // const auto v1 = static_cast<uint16_t>( static_cast<uint16_t>(color.r*255)*256 + color.g*255); | ||
| // const auto v2 = static_cast<uint16_t>( static_cast<uint16_t>(color.b*255)*256 + color.a*255); | ||
| // return {{ static_cast<float>(v1), static_cast<float>(v2) }}; | ||
| // } |
There was a problem hiding this comment.
Can we document this in a simpler way instead of adding a C++ comment in GLSL?
bb854ec to
8240952
Compare
|
@mollymerp heads up, I rebased / force-pushed |
f471e67 to
661bdf9
Compare
|
The dependent native PR needs to go into the release branch instead of master, so:
I'd love to hear that I'm overcomplicating this..... |
661bdf9 to
d7c8ba6
Compare
jfirebaugh
left a comment
There was a problem hiding this comment.
I'd love to hear that I'm overcomplicating this.....
You're overcomplicating this. 😄 Per chat, I think we should just merge all gl-native changes into the release branch.
🎉 Hooray! I'll rebase this to master and update the gl-native sha |
d7c8ba6 to
09d1cd3
Compare
09d1cd3 to
81f4787
Compare
Companion to mapbox/mapbox-gl-native#8267