|
|
|
@ -61,15 +61,13 @@ void main() {
|
|
|
|
|
p.y = 0;
|
|
|
|
|
p.z = 255;
|
|
|
|
|
}
|
|
|
|
|
p.x = 125;
|
|
|
|
|
p.y = 255;
|
|
|
|
|
p.z = 255;
|
|
|
|
|
// p.z = max(p.z - (d0.x + d0.y + d0.z + d1.x + d1.y + d1.z)/5, 0);
|
|
|
|
|
|
|
|
|
|
write_buffer.buf[0] = (read_buffer.buf[idx] & (~0x000000FF) ) | (p.x);
|
|
|
|
|
//write_buffer.buf[idx] = (read_buffer.buf[idx] & (~0x0000FF00) ) | (p.y << 8);
|
|
|
|
|
//write_buffer.buf[idx] = (read_buffer.buf[idx] & (~0x00FF0000) ) | (p.z << 16);
|
|
|
|
|
//write_buffer.buf[idx] = (read_buffer.buf[idx] & (~0xFF000000) ) | (p.w << 24);
|
|
|
|
|
//p.z = max(p.z - (d0.x + d0.y + d0.z + d1.x + d1.y + d1.z)/5, 0);
|
|
|
|
|
|
|
|
|
|
write_buffer.buf[idx] = (write_buffer.buf[idx] & (~0x000000FF) ) | (p.x);
|
|
|
|
|
write_buffer.buf[idx] = (write_buffer.buf[idx] & (~0x0000FF00) ) | (p.y << 8);
|
|
|
|
|
write_buffer.buf[idx] = (write_buffer.buf[idx] & (~0x00FF0000) ) | (p.z << 16);
|
|
|
|
|
write_buffer.buf[idx] = (write_buffer.buf[idx] & (~0xFF000000) ) | (p.w << 24);
|
|
|
|
|
|
|
|
|
|
// read_buffer.buf[idx] = (read_buffer.buf[idx] & (~0x000000FF) ) | (p.x);
|
|
|
|
|
// read_buffer.buf[idx] = (read_buffer.buf[idx] & (~0x0000FF00) ) | (p.y << 8);
|
|
|
|
|