mirror of
https://github.com/barkeser2002/flower.git
synced 2026-09-25 16:36:15 +03:00
24 lines
581 B
GLSL
24 lines
581 B
GLSL
#version 460
|
|
#extension GL_GOOGLE_include_directive : enable
|
|
|
|
#include "shared_cbt.glsl"
|
|
|
|
|
|
|
|
layout (local_size_x = 256) in;
|
|
void main(void)
|
|
{
|
|
const int cbtID = u_CbtID;
|
|
uint cnt = (1u << u_PassID);
|
|
uint threadID = gl_GlobalInvocationID.x;
|
|
|
|
if (threadID < cnt)
|
|
{
|
|
uint nodeID = threadID + cnt;
|
|
uint x0 = cbt_HeapRead(cbtID, cbt_CreateNode(nodeID << 1u , u_PassID + 1));
|
|
uint x1 = cbt_HeapRead(cbtID, cbt_CreateNode(nodeID << 1u | 1u, u_PassID + 1));
|
|
|
|
cbt_a_HeapWrite(cbtID, cbt_CreateNode(nodeID, u_PassID), x0 + x1);
|
|
}
|
|
}
|