24 lines
349 B
Plaintext
24 lines
349 B
Plaintext
|
#version 450
|
||
|
#extension GL_ARB_gpu_shader_int64 : require
|
||
|
|
||
|
layout(local_size_x = 1) in;
|
||
|
|
||
|
layout(set = 0, binding = 1) buffer SSBO
|
||
|
{
|
||
|
float a;
|
||
|
};
|
||
|
|
||
|
layout(set = 0, binding = 0) uniform UBO
|
||
|
{
|
||
|
float b;
|
||
|
};
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
double b2 = b;
|
||
|
int64_t v = doubleBitsToInt64(b2);
|
||
|
v ^= 0x8000000000000000L;
|
||
|
double a2 = int64BitsToDouble(v);
|
||
|
a = float(a2);
|
||
|
}
|