mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'shader-fixes' into 'master'
Avoid a warning in shader code (alleged unsupported function) See merge request veloren/veloren!4238
This commit is contained in:
commit
6f28382a69
@ -13,17 +13,14 @@ layout(push_constant) uniform Params {
|
|||||||
|
|
||||||
layout(location = 0) out vec2 source_coords;
|
layout(location = 0) out vec2 source_coords;
|
||||||
|
|
||||||
uvec2 unpack(uint xy) {
|
vec2 unpack(uint xy) {
|
||||||
return uvec2(
|
return vec2(xy & 0xFFFF, (xy >> 16) & 0xFFFF);
|
||||||
bitfieldExtract(xy, 0, 16),
|
|
||||||
bitfieldExtract(xy, 16, 16)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
vec2 source_size = vec2(unpack(source_size_xy));
|
vec2 source_size = unpack(source_size_xy);
|
||||||
vec2 target_offset = vec2(unpack(target_offset_xy));
|
vec2 target_offset = unpack(target_offset_xy);
|
||||||
vec2 target_size = vec2(unpack(target_size_xy));
|
vec2 target_size = unpack(target_size_xy);
|
||||||
|
|
||||||
// Generate rectangle (counter clockwise triangles)
|
// Generate rectangle (counter clockwise triangles)
|
||||||
//
|
//
|
||||||
|
Loading…
Reference in New Issue
Block a user