支持锁屏帧的绘制
This commit is contained in:
parent
d0ffdc4867
commit
fb54be25ec
|
|
@ -12,11 +12,19 @@ layout(binding = 0, std140) uniform UniformBufferObject {
|
||||||
float resY; // offset 8
|
float resY; // offset 8
|
||||||
float rotation; // offset 12
|
float rotation; // offset 12
|
||||||
float wavePhase; // offset 16
|
float wavePhase; // offset 16
|
||||||
float padding1; // offset 20
|
float paintingEnabled; // offset 20 (0.0 = locked, 1.0 = normal)
|
||||||
float padding2; // offset 24
|
float padding1; // offset 24
|
||||||
} ubo;
|
} ubo;
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
// Check if painting is disabled (locked state)
|
||||||
|
if (ubo.paintingEnabled < 0.5) {
|
||||||
|
// Locked state: dark gray background (matching CustomWidget)
|
||||||
|
outColor = vec4(0.157, 0.157, 0.157, 1.0); // RGB(40, 40, 40)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Normal state: animated gradient background
|
||||||
// Normalize position to 0-1 range
|
// Normalize position to 0-1 range
|
||||||
vec2 uv = (fragPosition + 1.0) * 0.5;
|
vec2 uv = (fragPosition + 1.0) * 0.5;
|
||||||
|
|
||||||
|
|
@ -39,4 +47,3 @@ void main() {
|
||||||
|
|
||||||
outColor = vec4(finalColor, 1.0);
|
outColor = vec4(finalColor, 1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,84 +1,90 @@
|
||||||
// Auto-generated from background.frag.spv
|
// Auto-generated from background.frag.spv
|
||||||
// Size: 2624 bytes (656 words)
|
// Size: 2812 bytes (703 words)
|
||||||
0x07230203u, 0x00010000u, 0x0008000bu, 0x00000061u, 0x00000000u, 0x00020011u, 0x00000001u, 0x0006000bu,
|
0x07230203u, 0x00010000u, 0x0008000bu, 0x0000006bu, 0x00000000u, 0x00020011u, 0x00000001u, 0x0006000bu,
|
||||||
0x00000001u, 0x4c534c47u, 0x6474732eu, 0x3035342eu, 0x00000000u, 0x0003000eu, 0x00000000u, 0x00000001u,
|
0x00000001u, 0x4c534c47u, 0x6474732eu, 0x3035342eu, 0x00000000u, 0x0003000eu, 0x00000000u, 0x00000001u,
|
||||||
0x0009000fu, 0x00000004u, 0x00000004u, 0x6e69616du, 0x00000000u, 0x0000000bu, 0x00000058u, 0x0000005fu,
|
0x0009000fu, 0x00000004u, 0x00000004u, 0x6e69616du, 0x00000000u, 0x00000016u, 0x0000001fu, 0x00000069u,
|
||||||
0x00000060u, 0x00030010u, 0x00000004u, 0x00000007u, 0x00030003u, 0x00000002u, 0x000001c2u, 0x00040005u,
|
0x0000006au, 0x00030010u, 0x00000004u, 0x00000007u, 0x00030003u, 0x00000002u, 0x000001c2u, 0x00040005u,
|
||||||
0x00000004u, 0x6e69616du, 0x00000000u, 0x00030005u, 0x00000009u, 0x00007675u, 0x00060005u, 0x0000000bu,
|
0x00000004u, 0x6e69616du, 0x00000000u, 0x00070005u, 0x00000007u, 0x66696e55u, 0x426d726fu, 0x65666675u,
|
||||||
0x67617266u, 0x69736f50u, 0x6e6f6974u, 0x00000000u, 0x00030005u, 0x00000013u, 0x00000074u, 0x00070005u,
|
0x6a624f72u, 0x00746365u, 0x00050006u, 0x00000007u, 0x00000000u, 0x656d6974u, 0x00000000u, 0x00050006u,
|
||||||
0x00000014u, 0x66696e55u, 0x426d726fu, 0x65666675u, 0x6a624f72u, 0x00746365u, 0x00050006u, 0x00000014u,
|
0x00000007u, 0x00000001u, 0x58736572u, 0x00000000u, 0x00050006u, 0x00000007u, 0x00000002u, 0x59736572u,
|
||||||
0x00000000u, 0x656d6974u, 0x00000000u, 0x00050006u, 0x00000014u, 0x00000001u, 0x58736572u, 0x00000000u,
|
0x00000000u, 0x00060006u, 0x00000007u, 0x00000003u, 0x61746f72u, 0x6e6f6974u, 0x00000000u, 0x00060006u,
|
||||||
0x00050006u, 0x00000014u, 0x00000002u, 0x59736572u, 0x00000000u, 0x00060006u, 0x00000014u, 0x00000003u,
|
0x00000007u, 0x00000004u, 0x65766177u, 0x73616850u, 0x00000065u, 0x00070006u, 0x00000007u, 0x00000005u,
|
||||||
0x61746f72u, 0x6e6f6974u, 0x00000000u, 0x00060006u, 0x00000014u, 0x00000004u, 0x65766177u, 0x73616850u,
|
0x6e696170u, 0x676e6974u, 0x62616e45u, 0x0064656cu, 0x00060006u, 0x00000007u, 0x00000006u, 0x64646170u,
|
||||||
0x00000065u, 0x00060006u, 0x00000014u, 0x00000005u, 0x64646170u, 0x31676e69u, 0x00000000u, 0x00060006u,
|
0x31676e69u, 0x00000000u, 0x00030005u, 0x00000009u, 0x006f6275u, 0x00050005u, 0x00000016u, 0x4374756fu,
|
||||||
0x00000014u, 0x00000006u, 0x64646170u, 0x32676e69u, 0x00000000u, 0x00030005u, 0x00000016u, 0x006f6275u,
|
0x726f6c6fu, 0x00000000u, 0x00030005u, 0x0000001du, 0x00007675u, 0x00060005u, 0x0000001fu, 0x67617266u,
|
||||||
0x00030005u, 0x0000001eu, 0x00000072u, 0x00030005u, 0x00000027u, 0x00000067u, 0x00030005u, 0x00000030u,
|
0x69736f50u, 0x6e6f6974u, 0x00000000u, 0x00030005u, 0x00000025u, 0x00000074u, 0x00030005u, 0x0000002bu,
|
||||||
0x00000062u, 0x00040005u, 0x0000003cu, 0x6f6c6f63u, 0x00003172u, 0x00040005u, 0x00000041u, 0x6f6c6f63u,
|
0x00000072u, 0x00030005u, 0x00000034u, 0x00000067u, 0x00030005u, 0x0000003du, 0x00000062u, 0x00040005u,
|
||||||
0x00003272u, 0x00050005u, 0x00000045u, 0x64617267u, 0x746e6569u, 0x00000000u, 0x00050005u, 0x00000050u,
|
0x00000049u, 0x6f6c6f63u, 0x00003172u, 0x00040005u, 0x0000004eu, 0x6f6c6f63u, 0x00003272u, 0x00050005u,
|
||||||
0x616e6966u, 0x6c6f436cu, 0x0000726fu, 0x00050005u, 0x00000058u, 0x4374756fu, 0x726f6c6fu, 0x00000000u,
|
0x00000052u, 0x64617267u, 0x746e6569u, 0x00000000u, 0x00050005u, 0x0000005du, 0x616e6966u, 0x6c6f436cu,
|
||||||
0x00050005u, 0x0000005fu, 0x67617266u, 0x6f6c6f43u, 0x00000072u, 0x00060005u, 0x00000060u, 0x67617266u,
|
0x0000726fu, 0x00050005u, 0x00000069u, 0x67617266u, 0x6f6c6f43u, 0x00000072u, 0x00060005u, 0x0000006au,
|
||||||
0x43786554u, 0x64726f6fu, 0x00000000u, 0x00040047u, 0x0000000bu, 0x0000001eu, 0x00000002u, 0x00050048u,
|
0x67617266u, 0x43786554u, 0x64726f6fu, 0x00000000u, 0x00050048u, 0x00000007u, 0x00000000u, 0x00000023u,
|
||||||
0x00000014u, 0x00000000u, 0x00000023u, 0x00000000u, 0x00050048u, 0x00000014u, 0x00000001u, 0x00000023u,
|
0x00000000u, 0x00050048u, 0x00000007u, 0x00000001u, 0x00000023u, 0x00000004u, 0x00050048u, 0x00000007u,
|
||||||
0x00000004u, 0x00050048u, 0x00000014u, 0x00000002u, 0x00000023u, 0x00000008u, 0x00050048u, 0x00000014u,
|
0x00000002u, 0x00000023u, 0x00000008u, 0x00050048u, 0x00000007u, 0x00000003u, 0x00000023u, 0x0000000cu,
|
||||||
0x00000003u, 0x00000023u, 0x0000000cu, 0x00050048u, 0x00000014u, 0x00000004u, 0x00000023u, 0x00000010u,
|
0x00050048u, 0x00000007u, 0x00000004u, 0x00000023u, 0x00000010u, 0x00050048u, 0x00000007u, 0x00000005u,
|
||||||
0x00050048u, 0x00000014u, 0x00000005u, 0x00000023u, 0x00000014u, 0x00050048u, 0x00000014u, 0x00000006u,
|
0x00000023u, 0x00000014u, 0x00050048u, 0x00000007u, 0x00000006u, 0x00000023u, 0x00000018u, 0x00030047u,
|
||||||
0x00000023u, 0x00000018u, 0x00030047u, 0x00000014u, 0x00000002u, 0x00040047u, 0x00000016u, 0x00000022u,
|
0x00000007u, 0x00000002u, 0x00040047u, 0x00000009u, 0x00000022u, 0x00000000u, 0x00040047u, 0x00000009u,
|
||||||
0x00000000u, 0x00040047u, 0x00000016u, 0x00000021u, 0x00000000u, 0x00040047u, 0x00000058u, 0x0000001eu,
|
0x00000021u, 0x00000000u, 0x00040047u, 0x00000016u, 0x0000001eu, 0x00000000u, 0x00040047u, 0x0000001fu,
|
||||||
0x00000000u, 0x00040047u, 0x0000005fu, 0x0000001eu, 0x00000000u, 0x00040047u, 0x00000060u, 0x0000001eu,
|
0x0000001eu, 0x00000002u, 0x00040047u, 0x00000069u, 0x0000001eu, 0x00000000u, 0x00040047u, 0x0000006au,
|
||||||
0x00000001u, 0x00020013u, 0x00000002u, 0x00030021u, 0x00000003u, 0x00000002u, 0x00030016u, 0x00000006u,
|
0x0000001eu, 0x00000001u, 0x00020013u, 0x00000002u, 0x00030021u, 0x00000003u, 0x00000002u, 0x00030016u,
|
||||||
0x00000020u, 0x00040017u, 0x00000007u, 0x00000006u, 0x00000002u, 0x00040020u, 0x00000008u, 0x00000007u,
|
0x00000006u, 0x00000020u, 0x0009001eu, 0x00000007u, 0x00000006u, 0x00000006u, 0x00000006u, 0x00000006u,
|
||||||
0x00000007u, 0x00040020u, 0x0000000au, 0x00000001u, 0x00000007u, 0x0004003bu, 0x0000000au, 0x0000000bu,
|
0x00000006u, 0x00000006u, 0x00000006u, 0x00040020u, 0x00000008u, 0x00000002u, 0x00000007u, 0x0004003bu,
|
||||||
0x00000001u, 0x0004002bu, 0x00000006u, 0x0000000du, 0x3f800000u, 0x0004002bu, 0x00000006u, 0x00000010u,
|
0x00000008u, 0x00000009u, 0x00000002u, 0x00040015u, 0x0000000au, 0x00000020u, 0x00000001u, 0x0004002bu,
|
||||||
0x3f000000u, 0x00040020u, 0x00000012u, 0x00000007u, 0x00000006u, 0x0009001eu, 0x00000014u, 0x00000006u,
|
0x0000000au, 0x0000000bu, 0x00000005u, 0x00040020u, 0x0000000cu, 0x00000002u, 0x00000006u, 0x0004002bu,
|
||||||
0x00000006u, 0x00000006u, 0x00000006u, 0x00000006u, 0x00000006u, 0x00000006u, 0x00040020u, 0x00000015u,
|
0x00000006u, 0x0000000fu, 0x3f000000u, 0x00020014u, 0x00000010u, 0x00040017u, 0x00000014u, 0x00000006u,
|
||||||
0x00000002u, 0x00000014u, 0x0004003bu, 0x00000015u, 0x00000016u, 0x00000002u, 0x00040015u, 0x00000017u,
|
0x00000004u, 0x00040020u, 0x00000015u, 0x00000003u, 0x00000014u, 0x0004003bu, 0x00000015u, 0x00000016u,
|
||||||
0x00000020u, 0x00000001u, 0x0004002bu, 0x00000017u, 0x00000018u, 0x00000000u, 0x00040020u, 0x00000019u,
|
0x00000003u, 0x0004002bu, 0x00000006u, 0x00000017u, 0x3e20c49cu, 0x0004002bu, 0x00000006u, 0x00000018u,
|
||||||
0x00000002u, 0x00000006u, 0x0004002bu, 0x00000006u, 0x0000001cu, 0x43b40000u, 0x0004002bu, 0x00000006u,
|
0x3f800000u, 0x0007002cu, 0x00000014u, 0x00000019u, 0x00000017u, 0x00000017u, 0x00000017u, 0x00000018u,
|
||||||
0x0000001fu, 0x3ec8b439u, 0x0004002bu, 0x00000006u, 0x00000020u, 0x3e48b439u, 0x0004002bu, 0x00000006u,
|
0x00040017u, 0x0000001bu, 0x00000006u, 0x00000002u, 0x00040020u, 0x0000001cu, 0x00000007u, 0x0000001bu,
|
||||||
0x00000022u, 0x40c90fd0u, 0x0004002bu, 0x00000006u, 0x00000028u, 0x3f16872bu, 0x0004002bu, 0x00000006u,
|
0x00040020u, 0x0000001eu, 0x00000001u, 0x0000001bu, 0x0004003bu, 0x0000001eu, 0x0000001fu, 0x00000001u,
|
||||||
0x0000002bu, 0x3f860419u, 0x0004002bu, 0x00000006u, 0x00000031u, 0x3f48b439u, 0x0004002bu, 0x00000006u,
|
0x00040020u, 0x00000024u, 0x00000007u, 0x00000006u, 0x0004002bu, 0x0000000au, 0x00000026u, 0x00000000u,
|
||||||
0x00000032u, 0x3e5d2f1bu, 0x0004002bu, 0x00000006u, 0x00000035u, 0x40060419u, 0x00040017u, 0x0000003au,
|
0x0004002bu, 0x00000006u, 0x00000029u, 0x43b40000u, 0x0004002bu, 0x00000006u, 0x0000002cu, 0x3ec8b439u,
|
||||||
0x00000006u, 0x00000003u, 0x00040020u, 0x0000003bu, 0x00000007u, 0x0000003au, 0x0004002bu, 0x00000006u,
|
0x0004002bu, 0x00000006u, 0x0000002du, 0x3e48b439u, 0x0004002bu, 0x00000006u, 0x0000002fu, 0x40c90fd0u,
|
||||||
0x00000042u, 0x3df1a9fcu, 0x0004002bu, 0x00000006u, 0x00000043u, 0x3e70a3d7u, 0x0006002cu, 0x0000003au,
|
0x0004002bu, 0x00000006u, 0x00000035u, 0x3f16872bu, 0x0004002bu, 0x00000006u, 0x00000038u, 0x3f860419u,
|
||||||
0x00000044u, 0x00000042u, 0x00000042u, 0x00000043u, 0x00040015u, 0x00000046u, 0x00000020u, 0x00000000u,
|
0x0004002bu, 0x00000006u, 0x0000003eu, 0x3f48b439u, 0x0004002bu, 0x00000006u, 0x0000003fu, 0x3e5d2f1bu,
|
||||||
0x0004002bu, 0x00000046u, 0x00000047u, 0x00000000u, 0x0004002bu, 0x00000046u, 0x0000004bu, 0x00000001u,
|
0x0004002bu, 0x00000006u, 0x00000042u, 0x40060419u, 0x00040017u, 0x00000047u, 0x00000006u, 0x00000003u,
|
||||||
0x00040017u, 0x00000056u, 0x00000006u, 0x00000004u, 0x00040020u, 0x00000057u, 0x00000003u, 0x00000056u,
|
0x00040020u, 0x00000048u, 0x00000007u, 0x00000047u, 0x0004002bu, 0x00000006u, 0x0000004fu, 0x3df1a9fcu,
|
||||||
0x0004003bu, 0x00000057u, 0x00000058u, 0x00000003u, 0x00040020u, 0x0000005eu, 0x00000001u, 0x00000056u,
|
0x0004002bu, 0x00000006u, 0x00000050u, 0x3e70a3d7u, 0x0006002cu, 0x00000047u, 0x00000051u, 0x0000004fu,
|
||||||
0x0004003bu, 0x0000005eu, 0x0000005fu, 0x00000001u, 0x0004003bu, 0x0000000au, 0x00000060u, 0x00000001u,
|
0x0000004fu, 0x00000050u, 0x00040015u, 0x00000053u, 0x00000020u, 0x00000000u, 0x0004002bu, 0x00000053u,
|
||||||
0x00050036u, 0x00000002u, 0x00000004u, 0x00000000u, 0x00000003u, 0x000200f8u, 0x00000005u, 0x0004003bu,
|
0x00000054u, 0x00000000u, 0x0004002bu, 0x00000053u, 0x00000058u, 0x00000001u, 0x00040020u, 0x00000068u,
|
||||||
0x00000008u, 0x00000009u, 0x00000007u, 0x0004003bu, 0x00000012u, 0x00000013u, 0x00000007u, 0x0004003bu,
|
0x00000001u, 0x00000014u, 0x0004003bu, 0x00000068u, 0x00000069u, 0x00000001u, 0x0004003bu, 0x0000001eu,
|
||||||
0x00000012u, 0x0000001eu, 0x00000007u, 0x0004003bu, 0x00000012u, 0x00000027u, 0x00000007u, 0x0004003bu,
|
0x0000006au, 0x00000001u, 0x00050036u, 0x00000002u, 0x00000004u, 0x00000000u, 0x00000003u, 0x000200f8u,
|
||||||
0x00000012u, 0x00000030u, 0x00000007u, 0x0004003bu, 0x0000003bu, 0x0000003cu, 0x00000007u, 0x0004003bu,
|
0x00000005u, 0x0004003bu, 0x0000001cu, 0x0000001du, 0x00000007u, 0x0004003bu, 0x00000024u, 0x00000025u,
|
||||||
0x0000003bu, 0x00000041u, 0x00000007u, 0x0004003bu, 0x00000012u, 0x00000045u, 0x00000007u, 0x0004003bu,
|
0x00000007u, 0x0004003bu, 0x00000024u, 0x0000002bu, 0x00000007u, 0x0004003bu, 0x00000024u, 0x00000034u,
|
||||||
0x0000003bu, 0x00000050u, 0x00000007u, 0x0004003du, 0x00000007u, 0x0000000cu, 0x0000000bu, 0x00050050u,
|
0x00000007u, 0x0004003bu, 0x00000024u, 0x0000003du, 0x00000007u, 0x0004003bu, 0x00000048u, 0x00000049u,
|
||||||
0x00000007u, 0x0000000eu, 0x0000000du, 0x0000000du, 0x00050081u, 0x00000007u, 0x0000000fu, 0x0000000cu,
|
0x00000007u, 0x0004003bu, 0x00000048u, 0x0000004eu, 0x00000007u, 0x0004003bu, 0x00000024u, 0x00000052u,
|
||||||
0x0000000eu, 0x0005008eu, 0x00000007u, 0x00000011u, 0x0000000fu, 0x00000010u, 0x0003003eu, 0x00000009u,
|
0x00000007u, 0x0004003bu, 0x00000048u, 0x0000005du, 0x00000007u, 0x00050041u, 0x0000000cu, 0x0000000du,
|
||||||
0x00000011u, 0x00050041u, 0x00000019u, 0x0000001au, 0x00000016u, 0x00000018u, 0x0004003du, 0x00000006u,
|
0x00000009u, 0x0000000bu, 0x0004003du, 0x00000006u, 0x0000000eu, 0x0000000du, 0x000500b8u, 0x00000010u,
|
||||||
0x0000001bu, 0x0000001au, 0x00050088u, 0x00000006u, 0x0000001du, 0x0000001bu, 0x0000001cu, 0x0003003eu,
|
0x00000011u, 0x0000000eu, 0x0000000fu, 0x000300f7u, 0x00000013u, 0x00000000u, 0x000400fau, 0x00000011u,
|
||||||
0x00000013u, 0x0000001du, 0x0004003du, 0x00000006u, 0x00000021u, 0x00000013u, 0x00050085u, 0x00000006u,
|
0x00000012u, 0x00000013u, 0x000200f8u, 0x00000012u, 0x0003003eu, 0x00000016u, 0x00000019u, 0x000100fdu,
|
||||||
0x00000023u, 0x00000021u, 0x00000022u, 0x0006000cu, 0x00000006u, 0x00000024u, 0x00000001u, 0x0000000du,
|
0x000200f8u, 0x00000013u, 0x0004003du, 0x0000001bu, 0x00000020u, 0x0000001fu, 0x00050050u, 0x0000001bu,
|
||||||
0x00000023u, 0x00050085u, 0x00000006u, 0x00000025u, 0x00000020u, 0x00000024u, 0x00050081u, 0x00000006u,
|
0x00000021u, 0x00000018u, 0x00000018u, 0x00050081u, 0x0000001bu, 0x00000022u, 0x00000020u, 0x00000021u,
|
||||||
0x00000026u, 0x0000001fu, 0x00000025u, 0x0003003eu, 0x0000001eu, 0x00000026u, 0x0004003du, 0x00000006u,
|
0x0005008eu, 0x0000001bu, 0x00000023u, 0x00000022u, 0x0000000fu, 0x0003003eu, 0x0000001du, 0x00000023u,
|
||||||
0x00000029u, 0x00000013u, 0x00050085u, 0x00000006u, 0x0000002au, 0x00000029u, 0x00000022u, 0x00050081u,
|
0x00050041u, 0x0000000cu, 0x00000027u, 0x00000009u, 0x00000026u, 0x0004003du, 0x00000006u, 0x00000028u,
|
||||||
0x00000006u, 0x0000002cu, 0x0000002au, 0x0000002bu, 0x0006000cu, 0x00000006u, 0x0000002du, 0x00000001u,
|
0x00000027u, 0x00050088u, 0x00000006u, 0x0000002au, 0x00000028u, 0x00000029u, 0x0003003eu, 0x00000025u,
|
||||||
0x0000000du, 0x0000002cu, 0x00050085u, 0x00000006u, 0x0000002eu, 0x00000020u, 0x0000002du, 0x00050081u,
|
0x0000002au, 0x0004003du, 0x00000006u, 0x0000002eu, 0x00000025u, 0x00050085u, 0x00000006u, 0x00000030u,
|
||||||
0x00000006u, 0x0000002fu, 0x00000028u, 0x0000002eu, 0x0003003eu, 0x00000027u, 0x0000002fu, 0x0004003du,
|
0x0000002eu, 0x0000002fu, 0x0006000cu, 0x00000006u, 0x00000031u, 0x00000001u, 0x0000000du, 0x00000030u,
|
||||||
0x00000006u, 0x00000033u, 0x00000013u, 0x00050085u, 0x00000006u, 0x00000034u, 0x00000033u, 0x00000022u,
|
0x00050085u, 0x00000006u, 0x00000032u, 0x0000002du, 0x00000031u, 0x00050081u, 0x00000006u, 0x00000033u,
|
||||||
0x00050081u, 0x00000006u, 0x00000036u, 0x00000034u, 0x00000035u, 0x0006000cu, 0x00000006u, 0x00000037u,
|
0x0000002cu, 0x00000032u, 0x0003003eu, 0x0000002bu, 0x00000033u, 0x0004003du, 0x00000006u, 0x00000036u,
|
||||||
0x00000001u, 0x0000000du, 0x00000036u, 0x00050085u, 0x00000006u, 0x00000038u, 0x00000032u, 0x00000037u,
|
0x00000025u, 0x00050085u, 0x00000006u, 0x00000037u, 0x00000036u, 0x0000002fu, 0x00050081u, 0x00000006u,
|
||||||
0x00050081u, 0x00000006u, 0x00000039u, 0x00000031u, 0x00000038u, 0x0003003eu, 0x00000030u, 0x00000039u,
|
0x00000039u, 0x00000037u, 0x00000038u, 0x0006000cu, 0x00000006u, 0x0000003au, 0x00000001u, 0x0000000du,
|
||||||
0x0004003du, 0x00000006u, 0x0000003du, 0x0000001eu, 0x0004003du, 0x00000006u, 0x0000003eu, 0x00000027u,
|
0x00000039u, 0x00050085u, 0x00000006u, 0x0000003bu, 0x0000002du, 0x0000003au, 0x00050081u, 0x00000006u,
|
||||||
0x0004003du, 0x00000006u, 0x0000003fu, 0x00000030u, 0x00060050u, 0x0000003au, 0x00000040u, 0x0000003du,
|
0x0000003cu, 0x00000035u, 0x0000003bu, 0x0003003eu, 0x00000034u, 0x0000003cu, 0x0004003du, 0x00000006u,
|
||||||
0x0000003eu, 0x0000003fu, 0x0003003eu, 0x0000003cu, 0x00000040u, 0x0003003eu, 0x00000041u, 0x00000044u,
|
0x00000040u, 0x00000025u, 0x00050085u, 0x00000006u, 0x00000041u, 0x00000040u, 0x0000002fu, 0x00050081u,
|
||||||
0x00050041u, 0x00000012u, 0x00000048u, 0x00000009u, 0x00000047u, 0x0004003du, 0x00000006u, 0x00000049u,
|
0x00000006u, 0x00000043u, 0x00000041u, 0x00000042u, 0x0006000cu, 0x00000006u, 0x00000044u, 0x00000001u,
|
||||||
0x00000048u, 0x00050085u, 0x00000006u, 0x0000004au, 0x00000049u, 0x00000010u, 0x00050041u, 0x00000012u,
|
0x0000000du, 0x00000043u, 0x00050085u, 0x00000006u, 0x00000045u, 0x0000003fu, 0x00000044u, 0x00050081u,
|
||||||
0x0000004cu, 0x00000009u, 0x0000004bu, 0x0004003du, 0x00000006u, 0x0000004du, 0x0000004cu, 0x00050085u,
|
0x00000006u, 0x00000046u, 0x0000003eu, 0x00000045u, 0x0003003eu, 0x0000003du, 0x00000046u, 0x0004003du,
|
||||||
0x00000006u, 0x0000004eu, 0x0000004du, 0x00000010u, 0x00050081u, 0x00000006u, 0x0000004fu, 0x0000004au,
|
0x00000006u, 0x0000004au, 0x0000002bu, 0x0004003du, 0x00000006u, 0x0000004bu, 0x00000034u, 0x0004003du,
|
||||||
0x0000004eu, 0x0003003eu, 0x00000045u, 0x0000004fu, 0x0004003du, 0x0000003au, 0x00000051u, 0x0000003cu,
|
0x00000006u, 0x0000004cu, 0x0000003du, 0x00060050u, 0x00000047u, 0x0000004du, 0x0000004au, 0x0000004bu,
|
||||||
0x0004003du, 0x0000003au, 0x00000052u, 0x00000041u, 0x0004003du, 0x00000006u, 0x00000053u, 0x00000045u,
|
0x0000004cu, 0x0003003eu, 0x00000049u, 0x0000004du, 0x0003003eu, 0x0000004eu, 0x00000051u, 0x00050041u,
|
||||||
0x00060050u, 0x0000003au, 0x00000054u, 0x00000053u, 0x00000053u, 0x00000053u, 0x0008000cu, 0x0000003au,
|
0x00000024u, 0x00000055u, 0x0000001du, 0x00000054u, 0x0004003du, 0x00000006u, 0x00000056u, 0x00000055u,
|
||||||
0x00000055u, 0x00000001u, 0x0000002eu, 0x00000051u, 0x00000052u, 0x00000054u, 0x0003003eu, 0x00000050u,
|
0x00050085u, 0x00000006u, 0x00000057u, 0x00000056u, 0x0000000fu, 0x00050041u, 0x00000024u, 0x00000059u,
|
||||||
0x00000055u, 0x0004003du, 0x0000003au, 0x00000059u, 0x00000050u, 0x00050051u, 0x00000006u, 0x0000005au,
|
0x0000001du, 0x00000058u, 0x0004003du, 0x00000006u, 0x0000005au, 0x00000059u, 0x00050085u, 0x00000006u,
|
||||||
0x00000059u, 0x00000000u, 0x00050051u, 0x00000006u, 0x0000005bu, 0x00000059u, 0x00000001u, 0x00050051u,
|
0x0000005bu, 0x0000005au, 0x0000000fu, 0x00050081u, 0x00000006u, 0x0000005cu, 0x00000057u, 0x0000005bu,
|
||||||
0x00000006u, 0x0000005cu, 0x00000059u, 0x00000002u, 0x00070050u, 0x00000056u, 0x0000005du, 0x0000005au,
|
0x0003003eu, 0x00000052u, 0x0000005cu, 0x0004003du, 0x00000047u, 0x0000005eu, 0x00000049u, 0x0004003du,
|
||||||
0x0000005bu, 0x0000005cu, 0x0000000du, 0x0003003eu, 0x00000058u, 0x0000005du, 0x000100fdu, 0x00010038u
|
0x00000047u, 0x0000005fu, 0x0000004eu, 0x0004003du, 0x00000006u, 0x00000060u, 0x00000052u, 0x00060050u,
|
||||||
|
0x00000047u, 0x00000061u, 0x00000060u, 0x00000060u, 0x00000060u, 0x0008000cu, 0x00000047u, 0x00000062u,
|
||||||
|
0x00000001u, 0x0000002eu, 0x0000005eu, 0x0000005fu, 0x00000061u, 0x0003003eu, 0x0000005du, 0x00000062u,
|
||||||
|
0x0004003du, 0x00000047u, 0x00000063u, 0x0000005du, 0x00050051u, 0x00000006u, 0x00000064u, 0x00000063u,
|
||||||
|
0x00000000u, 0x00050051u, 0x00000006u, 0x00000065u, 0x00000063u, 0x00000001u, 0x00050051u, 0x00000006u,
|
||||||
|
0x00000066u, 0x00000063u, 0x00000002u, 0x00070050u, 0x00000014u, 0x00000067u, 0x00000064u, 0x00000065u,
|
||||||
|
0x00000066u, 0x00000018u, 0x0003003eu, 0x00000016u, 0x00000067u, 0x000100fdu, 0x00010038u
|
||||||
|
|
|
||||||
|
|
@ -558,6 +558,7 @@ void VulkanRenderer::recordCommandBuffer(VkCommandBuffer commandBuffer,
|
||||||
m_ubo.resolution[1] = static_cast<float>(m_height);
|
m_ubo.resolution[1] = static_cast<float>(m_height);
|
||||||
m_ubo.rotation = static_cast<float>(rotationAngle);
|
m_ubo.rotation = static_cast<float>(rotationAngle);
|
||||||
m_ubo.wavePhase = static_cast<float>(wavePhase);
|
m_ubo.wavePhase = static_cast<float>(wavePhase);
|
||||||
|
m_ubo.paintingEnabled = paintingEnabled ? 1.0f : 0.0f;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,8 @@ struct UniformBufferObject {
|
||||||
float resolution[2]; // 分辨率 (width, height)
|
float resolution[2]; // 分辨率 (width, height)
|
||||||
float rotation; // 旋转角度
|
float rotation; // 旋转角度
|
||||||
float wavePhase; // 波浪相位
|
float wavePhase; // 波浪相位
|
||||||
float padding[2]; // 对齐到 16 字节边界
|
float paintingEnabled; // 是否启用绘制(0.0 = 锁屏,1.0 = 正常)
|
||||||
|
float padding[1]; // 对齐到 16 字节边界
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -639,10 +639,13 @@ bool VulkanWidget::recreateSwapchain()
|
||||||
|
|
||||||
void VulkanWidget::renderFrame()
|
void VulkanWidget::renderFrame()
|
||||||
{
|
{
|
||||||
if (!m_initialized || !m_renderingEnabled) {
|
if (!m_initialized) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 关键修复:即使 renderingEnabled=false 也继续渲染,以显示锁屏状态
|
||||||
|
// 只是传递不同的 paintingEnabled 参数给 renderer
|
||||||
|
|
||||||
// Wait for previous frame
|
// Wait for previous frame
|
||||||
vkWaitForFences(m_device, 1, &m_inFlightFences[m_currentFrame], VK_TRUE, UINT64_MAX);
|
vkWaitForFences(m_device, 1, &m_inFlightFences[m_currentFrame], VK_TRUE, UINT64_MAX);
|
||||||
|
|
||||||
|
|
@ -912,7 +915,10 @@ void VulkanWidget::setRenderingEnabled(bool enabled)
|
||||||
|
|
||||||
if (m_renderingEnabled) {
|
if (m_renderingEnabled) {
|
||||||
qDebug() << "Vulkan rendering ENABLED - Resuming animations";
|
qDebug() << "Vulkan rendering ENABLED - Resuming animations";
|
||||||
m_renderTimer->start(16); // ~60 FPS
|
// 定时器始终运行,无需重新启动
|
||||||
|
if (!m_renderTimer->isActive()) {
|
||||||
|
m_renderTimer->start(16); // ~60 FPS
|
||||||
|
}
|
||||||
|
|
||||||
// Unlocked: calculate lock duration
|
// Unlocked: calculate lock duration
|
||||||
if (m_lastLockTime.isValid()) {
|
if (m_lastLockTime.isValid()) {
|
||||||
|
|
@ -926,8 +932,9 @@ void VulkanWidget::setRenderingEnabled(bool enabled)
|
||||||
|
|
||||||
m_startTime = QDateTime::currentDateTime();
|
m_startTime = QDateTime::currentDateTime();
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "Vulkan rendering DISABLED - Stopping animations";
|
qDebug() << "Vulkan rendering DISABLED - Showing locked state";
|
||||||
m_renderTimer->stop();
|
// 关键修复:不停止定时器,继续渲染以显示锁屏界面
|
||||||
|
// 只是不更新动画参数(在 onRenderTimer 中处理)
|
||||||
|
|
||||||
// Locked: record lock time
|
// Locked: record lock time
|
||||||
m_pauseTime = QDateTime::currentDateTime();
|
m_pauseTime = QDateTime::currentDateTime();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue