mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-25 18:30:21 +00:00
Okay, it looks like colour 3 is approximately phase offset 0, and the palette wraps around after 14 entries, not 16. Also got a bit less dependent on floating point accuracy for the step.
This commit is contained in:
parent
39027b675d
commit
7fb6c86d9d
@ -158,8 +158,8 @@ const char *Machine::get_signal_decoder()
|
|||||||
"{\n"
|
"{\n"
|
||||||
"vec2 c = texture(texID, coordinate).rg;"
|
"vec2 c = texture(texID, coordinate).rg;"
|
||||||
"float y = 0.1 + c.x * 0.91071428571429;\n"
|
"float y = 0.1 + c.x * 0.91071428571429;\n"
|
||||||
"float aOffset = 6.283185308 * c.y;\n"
|
"float aOffset = 6.283185308 * (c.y - 3.0 / 16.0) * 1.14285714285714;\n"
|
||||||
"return y + step(0.0625, c.y) * 0.1 * sin(phase + aOffset);\n"
|
"return y + step(0.03125, c.y) * 0.1 * sin(phase + aOffset);\n"
|
||||||
"}";
|
"}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user