shader things

This commit is contained in:
2025-07-15 23:05:45 +03:00
parent 3cba52f4ae
commit 5e431e5a85
5 changed files with 256 additions and 225 deletions

View File

@ -2,10 +2,10 @@ bpm: 138
rowsperbeat: 4 rowsperbeat: 4
score: score:
tracks: tracks:
- numvoices: 2 - numvoices: 1
order: [-1, -1, -1, -1, 0, -1, 1, -1, 0, -1, 1, -1, 2, -1, 1, -1, 3, -1, 1, -1, 2, -1, 1, -1, 4, -1, 1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 2, -1, -1, -1, 2, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 4, -1, 2, -1, 0, -1, -1, -1, 4, -1, 2, -1, 0, -1, -1, -1, 0, -1, -1, -1, 2, -1, 2, -1, 3, 5, 2, 6, 0, -1, -1, -1, 0, -1, 1, -1, 0, -1, 1, -1, 0, -1, 1, -1] order: [-1, -1, -1, -1, 0, -1, 1, -1, 0, -1, 1, -1, 2, -1, 1, -1, 3, -1, 1, -1, 2, -1, 1, -1, 4, -1, 1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 2, -1, -1, -1, 2, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 4, -1, 2, -1, 0, -1, -1, -1, 4, -1, 2, -1, 0, -1, -1, -1, 0, -1, -1, -1, 2, -1, 2, -1, 3, 5, 2, 6, 0, -1, -1, -1, 0, -1, 1, -1, 0, -1, 1, -1, 0, -1, 1, -1]
patterns: [[33, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [29, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [26, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [31, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 28, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 31, 1, 1, 1, 1, 1, 1, 1]] patterns: [[33, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [29, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [26, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [31, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 28, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 31, 1, 1, 1, 1, 1, 1, 1]]
- numvoices: 2 - numvoices: 1
order: [-1, -1, -1, -1, 0, -1, 1, -1, 0, -1, 1, -1, 2, -1, 1, -1, 3, -1, 1, -1, 2, -1, 1, -1, 4, -1, 1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 2, -1, -1, -1, 2, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 4, -1, 2, -1, 0, -1, -1, -1, 4, -1, 2, -1, 0, -1, -1, -1, 0, -1, -1, -1, 5, -1, 5, -1, 6, 7, 5, 8, 9, -1, -1, -1, 9, -1, 1, -1, 9, -1, 1, -1, 0, -1, 1, -1] order: [-1, -1, -1, -1, 0, -1, 1, -1, 0, -1, 1, -1, 2, -1, 1, -1, 3, -1, 1, -1, 2, -1, 1, -1, 4, -1, 1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 2, -1, -1, -1, 2, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 4, -1, 2, -1, 0, -1, -1, -1, 4, -1, 2, -1, 0, -1, -1, -1, 0, -1, -1, -1, 5, -1, 5, -1, 6, 7, 5, 8, 9, -1, -1, -1, 9, -1, 1, -1, 9, -1, 1, -1, 0, -1, 1, -1]
patterns: [[45, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [41, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [38, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [43, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [53, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [50, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 52, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 55, 1, 1, 1, 1, 1, 1, 1], [57, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]] patterns: [[45, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [41, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [38, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [43, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [53, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [50, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 52, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 55, 1, 1, 1, 1, 1, 1, 1], [57, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]
- numvoices: 1 - numvoices: 1
@ -23,14 +23,14 @@ score:
- numvoices: 1 - numvoices: 1
order: [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, -1, 2, 3, 4, 5, -1, 0, 6, -1, -1, 0, 6, -1, 7, 0, -1, -1, -1, 8, -1, -1, 9, -1, -1, -1, -1, 10, 7, 11, 12, 0, -1, -1, 13, 10, 7, 11, 7, 8, -1, 14, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1] order: [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, -1, 2, 3, 4, 5, -1, 0, 6, -1, -1, 0, 6, -1, 7, 0, -1, -1, -1, 8, -1, -1, 9, -1, -1, -1, -1, 10, 7, 11, 12, 0, -1, -1, 13, 10, 7, 11, 7, 8, -1, 14, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]
patterns: [[83, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 84, 1, 81, 1], [1, 1, 1, 1, 1, 1, 1, 1, 72, 1, 74, 1, 76, 1, 1, 1], [71, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 72, 1, 1, 1], [69, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 84, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 86, 1, 1, 1, 1, 1, 1, 1], [81, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [88, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [84, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 83, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1]] patterns: [[83, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 84, 1, 81, 1], [1, 1, 1, 1, 1, 1, 1, 1, 72, 1, 74, 1, 76, 1, 1, 1], [71, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 72, 1, 1, 1], [69, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 84, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 86, 1, 1, 1, 1, 1, 1, 1], [81, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [88, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [84, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 83, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1]]
- numvoices: 4 - numvoices: 1
order: [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, -1, 13, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1] order: [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, -1, 13, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]
patterns: [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 81, 83, 84, 86], [88, 83, 84, 81, 88, 83, 84, 81, 88, 83, 84, 81, 88, 83, 84, 81], [91, 83, 84, 81, 91, 83, 84, 81, 91, 83, 84, 81, 91, 83, 84, 81], [93, 83, 84, 81, 93, 83, 84, 81, 93, 83, 84, 81, 93, 83, 84, 81], [89, 81, 83, 84, 86, 88, 89, 91, 89, 81, 83, 84, 83, 84, 86, 88], [89, 79, 81, 83, 81, 83, 84, 86, 84, 86, 88, 89, 88, 84, 86, 83], [91, 88, 89, 86, 88, 84, 86, 83, 84, 81, 83, 79, 81, 77, 79, 76], [77, 74, 76, 72, 74, 71, 72, 69, 71, 67, 69, 65, 67, 69, 71, 74], [77, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 76, 1, 77, 76], [74, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 69, 71, 72, 76], [84, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 83, 1, 1, 1], [81, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 79, 1, 1, 1], [81, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]] patterns: [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 81, 83, 84, 86], [88, 83, 84, 81, 88, 83, 84, 81, 88, 83, 84, 81, 88, 83, 84, 81], [91, 83, 84, 81, 91, 83, 84, 81, 91, 83, 84, 81, 91, 83, 84, 81], [93, 83, 84, 81, 93, 83, 84, 81, 93, 83, 84, 81, 93, 83, 84, 81], [89, 81, 83, 84, 86, 88, 89, 91, 89, 81, 83, 84, 83, 84, 86, 88], [89, 79, 81, 83, 81, 83, 84, 86, 84, 86, 88, 89, 88, 84, 86, 83], [91, 88, 89, 86, 88, 84, 86, 83, 84, 81, 83, 79, 81, 77, 79, 76], [77, 74, 76, 72, 74, 71, 72, 69, 71, 67, 69, 65, 67, 69, 71, 74], [77, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 76, 1, 77, 76], [74, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 69, 71, 72, 76], [84, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 83, 1, 1, 1], [81, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 79, 1, 1, 1], [81, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]
rowsperpattern: 16 rowsperpattern: 16
length: 108 length: 108
patch: patch:
- name: 80s lead - name: 80s lead
numvoices: 4 numvoices: 2
units: units:
- type: oscillator - type: oscillator
id: 1089 id: 1089
@ -59,6 +59,9 @@ patch:
- type: filter - type: filter
id: 1133 id: 1133
parameters: {bandpass: 0, frequency: 10, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 88, stereo: 1} parameters: {bandpass: 0, frequency: 10, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 88, stereo: 1}
- type: sync
id: 1141
parameters: {}
- type: outaux - type: outaux
id: 1097 id: 1097
parameters: {auxgain: 34, outgain: 34, stereo: 1} parameters: {auxgain: 34, outgain: 34, stereo: 1}
@ -336,7 +339,7 @@ patch:
id: 1131 id: 1131
parameters: {auxgain: 15, outgain: 15, stereo: 1} parameters: {auxgain: 15, outgain: 15, stereo: 1}
- name: HappyLead - name: HappyLead
numvoices: 4 numvoices: 1
units: units:
- type: oscillator - type: oscillator
id: 164 id: 164

View File

@ -2,10 +2,10 @@ bpm: 138
rowsperbeat: 4 rowsperbeat: 4
score: score:
tracks: tracks:
- numvoices: 1 - numvoices: 2
order: [-1, -1, -1, -1, 0, -1, 1, -1, 0, -1, 1, -1, 2, -1, 1, -1, 3, -1, 1, -1, 2, -1, 1, -1, 4, -1, 1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 2, -1, -1, -1, 2, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 4, -1, 2, -1, 0, -1, -1, -1, 4, -1, 2, -1, 0, -1, -1, -1, 0, -1, -1, -1, 2, -1, 2, -1, 3, 5, 2, 6, 0, -1, -1, -1, 0, -1, 1, -1, 0, -1, 1, -1, 0, -1, 1, -1] order: [-1, -1, -1, -1, 0, -1, 1, -1, 0, -1, 1, -1, 2, -1, 1, -1, 3, -1, 1, -1, 2, -1, 1, -1, 4, -1, 1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 2, -1, -1, -1, 2, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 4, -1, 2, -1, 0, -1, -1, -1, 4, -1, 2, -1, 0, -1, -1, -1, 0, -1, -1, -1, 2, -1, 2, -1, 3, 5, 2, 6, 0, -1, -1, -1, 0, -1, 1, -1, 0, -1, 1, -1, 0, -1, 1, -1]
patterns: [[33, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [29, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [26, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [31, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 28, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 31, 1, 1, 1, 1, 1, 1, 1]] patterns: [[33, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [29, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [26, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [31, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 28, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 31, 1, 1, 1, 1, 1, 1, 1]]
- numvoices: 1 - numvoices: 2
order: [-1, -1, -1, -1, 0, -1, 1, -1, 0, -1, 1, -1, 2, -1, 1, -1, 3, -1, 1, -1, 2, -1, 1, -1, 4, -1, 1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 2, -1, -1, -1, 2, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 4, -1, 2, -1, 0, -1, -1, -1, 4, -1, 2, -1, 0, -1, -1, -1, 0, -1, -1, -1, 5, -1, 5, -1, 6, 7, 5, 8, 9, -1, -1, -1, 9, -1, 1, -1, 9, -1, 1, -1, 0, -1, 1, -1] order: [-1, -1, -1, -1, 0, -1, 1, -1, 0, -1, 1, -1, 2, -1, 1, -1, 3, -1, 1, -1, 2, -1, 1, -1, 4, -1, 1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 2, -1, -1, -1, 2, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 4, -1, 2, -1, 0, -1, -1, -1, 4, -1, 2, -1, 0, -1, -1, -1, 0, -1, -1, -1, 5, -1, 5, -1, 6, 7, 5, 8, 9, -1, -1, -1, 9, -1, 1, -1, 9, -1, 1, -1, 0, -1, 1, -1]
patterns: [[45, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [41, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [38, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [43, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [53, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [50, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 52, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 55, 1, 1, 1, 1, 1, 1, 1], [57, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]] patterns: [[45, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [41, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [38, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [43, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [53, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [50, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 52, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 55, 1, 1, 1, 1, 1, 1, 1], [57, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]
- numvoices: 1 - numvoices: 1
@ -23,14 +23,14 @@ score:
- numvoices: 1 - numvoices: 1
order: [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, -1, 2, 3, 4, 5, -1, 0, 6, -1, -1, 0, 6, -1, 7, 0, -1, -1, -1, 8, -1, -1, 9, -1, -1, -1, -1, 10, 7, 11, 12, 0, -1, -1, 13, 10, 7, 11, 7, 8, -1, 14, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1] order: [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, -1, 2, 3, 4, 5, -1, 0, 6, -1, -1, 0, 6, -1, 7, 0, -1, -1, -1, 8, -1, -1, 9, -1, -1, -1, -1, 10, 7, 11, 12, 0, -1, -1, 13, 10, 7, 11, 7, 8, -1, 14, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]
patterns: [[83, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 84, 1, 81, 1], [1, 1, 1, 1, 1, 1, 1, 1, 72, 1, 74, 1, 76, 1, 1, 1], [71, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 72, 1, 1, 1], [69, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 84, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 86, 1, 1, 1, 1, 1, 1, 1], [81, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [88, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [84, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 83, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1]] patterns: [[83, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 84, 1, 81, 1], [1, 1, 1, 1, 1, 1, 1, 1, 72, 1, 74, 1, 76, 1, 1, 1], [71, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 72, 1, 1, 1], [69, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 84, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 86, 1, 1, 1, 1, 1, 1, 1], [81, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [88, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [84, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 83, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1]]
- numvoices: 1 - numvoices: 4
order: [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, -1, 13, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1] order: [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, -1, 13, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]
patterns: [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 81, 83, 84, 86], [88, 83, 84, 81, 88, 83, 84, 81, 88, 83, 84, 81, 88, 83, 84, 81], [91, 83, 84, 81, 91, 83, 84, 81, 91, 83, 84, 81, 91, 83, 84, 81], [93, 83, 84, 81, 93, 83, 84, 81, 93, 83, 84, 81, 93, 83, 84, 81], [89, 81, 83, 84, 86, 88, 89, 91, 89, 81, 83, 84, 83, 84, 86, 88], [89, 79, 81, 83, 81, 83, 84, 86, 84, 86, 88, 89, 88, 84, 86, 83], [91, 88, 89, 86, 88, 84, 86, 83, 84, 81, 83, 79, 81, 77, 79, 76], [77, 74, 76, 72, 74, 71, 72, 69, 71, 67, 69, 65, 67, 69, 71, 74], [77, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 76, 1, 77, 76], [74, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 69, 71, 72, 76], [84, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 83, 1, 1, 1], [81, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 79, 1, 1, 1], [81, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]] patterns: [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 81, 83, 84, 86], [88, 83, 84, 81, 88, 83, 84, 81, 88, 83, 84, 81, 88, 83, 84, 81], [91, 83, 84, 81, 91, 83, 84, 81, 91, 83, 84, 81, 91, 83, 84, 81], [93, 83, 84, 81, 93, 83, 84, 81, 93, 83, 84, 81, 93, 83, 84, 81], [89, 81, 83, 84, 86, 88, 89, 91, 89, 81, 83, 84, 83, 84, 86, 88], [89, 79, 81, 83, 81, 83, 84, 86, 84, 86, 88, 89, 88, 84, 86, 83], [91, 88, 89, 86, 88, 84, 86, 83, 84, 81, 83, 79, 81, 77, 79, 76], [77, 74, 76, 72, 74, 71, 72, 69, 71, 67, 69, 65, 67, 69, 71, 74], [77, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 76, 1, 77, 76], [74, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 69, 71, 72, 76], [84, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 83, 1, 1, 1], [81, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 79, 1, 1, 1], [81, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]
rowsperpattern: 16 rowsperpattern: 16
length: 108 length: 108
patch: patch:
- name: 80s lead - name: 80s lead
numvoices: 2 numvoices: 4
units: units:
- type: oscillator - type: oscillator
id: 1089 id: 1089
@ -59,9 +59,6 @@ patch:
- type: filter - type: filter
id: 1133 id: 1133
parameters: {bandpass: 0, frequency: 10, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 88, stereo: 1} parameters: {bandpass: 0, frequency: 10, highpass: 0, lowpass: 1, negbandpass: 0, neghighpass: 1, resonance: 88, stereo: 1}
- type: sync
id: 1141
parameters: {}
- type: outaux - type: outaux
id: 1097 id: 1097
parameters: {auxgain: 34, outgain: 34, stereo: 1} parameters: {auxgain: 34, outgain: 34, stereo: 1}
@ -339,7 +336,7 @@ patch:
id: 1131 id: 1131
parameters: {auxgain: 15, outgain: 15, stereo: 1} parameters: {auxgain: 15, outgain: 15, stereo: 1}
- name: HappyLead - name: HappyLead
numvoices: 1 numvoices: 4
units: units:
- type: oscillator - type: oscillator
id: 164 id: 164

View File

@ -8,10 +8,9 @@ layout(location = 0) uniform float syncs[7];
layout(location = 8) uniform float fft_output[512]; // FFT_SIZE / 4 layout(location = 8) uniform float fft_output[512]; // FFT_SIZE / 4
float u_time = syncs[0]; float u_time = syncs[0];
vec2 getUV(vec2 offset) { vec2 getUV() {
vec2 uv = 2.0 * ((gl_FragCoord.xy + offset *0.5) / vec2(1920,1080) - 0.5); const vec2 scale = vec2(0.00104166667, 0.00185185185);
uv.x *= 1920/1080; return gl_FragCoord.xy * scale - 1.0;
return uv;
} }
float noise(in vec2 xy, in float seed) { float noise(in vec2 xy, in float seed) {
@ -31,50 +30,59 @@ float sdHex(vec3 pos, float i, float angle) {
return d1; return d1;
} }
float getScaledFFT(int index, float scale, float offset) {
// Clamp index to valid range
index = clamp(index, 0, 511);
// Get raw FFT value
float raw = fft_output[index];
// Apply logarithmic scaling: log(1 + value * scale) + offset
return log(1.0 + raw * scale) + offset;
}
// Modify your mapScene function // Modify your mapScene function
vec2 mapScene(in vec3 p) { vec2 mapScene(in vec3 p) {
float mat = 0.; float mat = 0.;
float d = 1e9; float d = 1e9;
float a = 0.; float a = 0.;
vec3 po = p;
vec2 rippleCenter = vec2(7.,7.);
vec3 rippleCenter = vec3(7.5, 0, 7.5);
float rippleSpeed = 4.0; float rippleSpeed = 4.0;
float rippleFreq = 1.0; float rippleFreq = 1.0;
float rippleDecay = 0.25; float rippleDecay = 0.25;
// Hexagonal grid // Hexagonal grid
float counter = 0.;
float hexGap = 0.2; float hexGap = 0.2;
for(float j = 0.; j < 15.; j++) { for(float j = 0.; j < 16.; j++) {
po = p; vec3 po = p;
po += vec3(1.5 * 7.5, 0., 7.5); po += vec3((1.6 + hexGap) * 8, -5., -(1.88 + hexGap) * 10);
po += vec3(0, 0., (1.88 + hexGap)*j); po += vec3(0, 0., (1.88 + hexGap) * j);
for(float i = 0.; i < 15.; i++) { for(float i = 0.; i < 16.; i++) {
if( mod(i, 2.) == 0.) { if(mod(i, 2.) == 0.) {
po -= vec3(1.6+hexGap, 0., 1.); po -= vec3(1.6 + hexGap, 0., 1.);
} else { } else {
po += vec3(-(1.6+hexGap), 0., 1.); po += vec3(-(1.6 + hexGap), 0., 1.);
} }
// Add individual hexagon ripples based on distance from center // Add individual hexagon ripples based on distance from center
float hexDist = length(vec2(i , j) - rippleCenter.xz); int hexDist = int(length(vec2(i, j) - rippleCenter.xy));
float wave = sin(hexDist * rippleFreq - u_time * rippleSpeed) * exp(-hexDist * rippleDecay);
//float wave = sin(hexDist * rippleFreq - u_time * rippleSpeed) * exp(-hexDist * rippleDecay);
// Apply ripple to hexagon size and position // Apply ripple to hexagon size and position
float hexSize = fft_output[int(i+1)*int(j+1)]*5.0; // sin(1.5*u_time)+ wave
// float hexSize = fft_output[int(i+1)*int(j+1)]*5.0; // sin(1.5*u_time)+ wave
//float hexSize = fft_output[hexDist] * 5.0;
float hexSize = getScaledFFT(hexDist, 15.0, 0.0) * 2.0; // Adjusted multiplier
a = sdHex(po, 1. + hexSize, 0.); a = sdHex(po, 1. + hexSize, 0.);
d = min(d, a); d = min(d, a);
if (d == a) { if(d == a) {
mat = 4.; mat = 1.;
} }
counter += 1.;
} }
} }
@ -86,13 +94,13 @@ vec3 castRay(vec3 ro, vec3 rd, inout vec3 pos) {
float mat = 0.; float mat = 0.;
float hit = 0.; float hit = 0.;
// Reduced from 40 to 24 steps // Reduced from 40 to 24 steps
for(int i = 0; i < 24; i++) { for(int i = 0; i < 30; i++) {
pos = ro + rd * t; pos = ro + rd * t;
vec2 res = mapScene(pos); vec2 res = mapScene(pos);
// Increase step size multiplier for faster marching // Increase step size multiplier for faster marching
t += res.x * 1.2; t += res.x;
mat = res.y; mat = res.y;
if(t > 60.) { // Reduced max distance if(t > 100.) { // Reduced max distance
break; break;
} }
if(res.x < 0.001 * t) { // Less precise hit detection if(res.x < 0.001 * t) { // Less precise hit detection
@ -100,7 +108,8 @@ vec3 castRay(vec3 ro, vec3 rd, inout vec3 pos) {
break; break;
} }
} }
if(t > 60.) t = 0.; if (t > 100.)
t = 0.;
return vec3(t, mat, hit); return vec3(t, mat, hit);
} }
@ -123,30 +132,61 @@ float softshadow(in vec3 ro, in vec3 rd, float mint, float maxt, float w) {
vec3 calcNormal(vec3 pos) { vec3 calcNormal(vec3 pos) {
vec2 e = vec2(.01, 0.); vec2 e = vec2(.01, 0.);
vec3 n = vec3(mapScene(pos + e.xyy).x - mapScene(pos - e.xyy).x, vec3 n = vec3(mapScene(pos + e.xyy).x - mapScene(pos - e.xyy).x, mapScene(pos + e.yxy).x - mapScene(pos - e.yxy).x, mapScene(pos + e.yyx).x - mapScene(pos - e.yyx).x);
mapScene(pos + e.yxy).x - mapScene(pos - e.yxy).x,
mapScene(pos + e.yyx).x - mapScene(pos - e.yyx).x);
return normalize(n); return normalize(n);
} }
vec3 fresnel(vec3 F0, vec3 h, vec3 l) { vec3 addPointLight(vec3 lightPos, vec3 lightColor, float intensity, vec3 worldPos, vec3 viewDir, vec3 normal, float roughness) {
return F0 + (1.0 - F0) * pow(clamp(1.0 - dot(h, l), 0.0, 1.0), 5.0); // Light vector from surface to light
vec3 lightDir = lightPos - worldPos;
float lightDistance = length(lightDir);
lightDir = normalize(lightDir);
// Attenuation (quadratic falloff)
float attenuation = intensity / (1.0 + 0.09 * lightDistance + 0.032 * lightDistance * lightDistance);
// Diffuse lighting (Lambert)
float NdotL = max(dot(normal, lightDir), 0.0);
vec3 diffuse = lightColor * NdotL * attenuation;
// Specular lighting (Blinn-Phong)
vec3 halfDir = normalize(lightDir + (-viewDir));
float NdotH = max(dot(normal, halfDir), 0.0);
float shininess = mix(128.0, 8.0, roughness); // Convert roughness to shininess
vec3 specular = lightColor * pow(NdotH, shininess) * attenuation;
// Fresnel effect
vec3 F0 = vec3(0.04); // Base reflectance for dielectrics
vec3 fresnel = F0 + (1.0 - F0) * pow(clamp(1.0 - max(dot(halfDir, lightDir), 0.0), 0.0, 1.0), 5.0);
// Soft shadows
float shadow = softshadow(worldPos + normal * 0.01, lightDir, 0.02, lightDistance, 4.0);
// Combine diffuse and specular with shadow
return (diffuse + specular * fresnel) * shadow;
} }
vec3 addPointLight(vec3 light_pos, vec3 light_color, float shininess, vec3 v, vec3 dir, vec3 n, float occ) { /*vec3 addPointLight(vec3 lightPos, vec3 lightColor, float intensity, vec3 worldPos, vec3 viewDir, vec3 normal) {
vec3 Ks = vec3(.4545); vec3 lightDir = normalize(lightPos - worldPos);
vec3 Kd = vec3(1.); float lightDistance = length(lightPos - worldPos);
vec3 ref = reflect(dir, n);
vec3 vl = normalize(v);
vec3 diffuse = Kd * vec3(max(0.0, dot(vl, n)));
vec3 specular = vec3(max(0.0, dot(vl, ref)));
vec3 F = fresnel(Ks, normalize(vl - dir), vl);
float shadow = softshadow(v + n * 0.054, light_pos, .01, 30., 8.);
//specular = pow(specular, vec3(shininess)) * occ; // Attenuation
return light_color * mix(diffuse, specular, F) * shadow; float attenuation = intensity / (1.0 + 0.1 * lightDistance + 0.01 * lightDistance * lightDistance);
// Diffuse
float NdotL = max(dot(normal, lightDir), 0.0);
// Specular (Blinn-Phong)
vec3 halfDir = normalize(lightDir - viewDir);
float NdotH = max(dot(normal, halfDir), 0.0);
float specular = pow(NdotH, 32.0);
// Shadow
float shadow = softshadow(worldPos + normal * 0.01, lightDir, 0.01, lightDistance, 8.0);
return lightColor * (NdotL + specular * 0.5) * attenuation * shadow;
} }
*/
float getAmbientOcc(vec3 p, vec3 n) { float getAmbientOcc(vec3 p, vec3 n) {
float occ = 0.; float occ = 0.;
@ -161,17 +201,16 @@ float getAmbientOcc(vec3 p, vec3 n) {
} }
vec3 shading(vec3 v, vec3 n, vec3 dir, float material) { vec3 shading(vec3 v, vec3 n, vec3 dir, float material) {
float shininess = 0.1; float shininess = 0.01;
//float occ = getAmbientOcc(v, n);
float occ = 0.8;
vec3 outMaterial = vec3(0.0, 0.0, 0.0); vec3 outMaterial = vec3(0.0, 0.0, 0.0);
if(material == 0.) { if(material == 0.) {
outMaterial = vec3(0.8314, 0.2941, 0.2941); outMaterial = vec3(0.8314, 0.2941, 0.2941);
shininess = 0.5; shininess = 0.1;
} else if(material == 1.) { } else if(material == 1.) {
outMaterial = vec3(0.6275, 0.1569, 0.9412); outMaterial = vec3(0.6196, 0.6118, 0.6118);
shininess = 2.; shininess = .7;
} else if(material == 2.) { } else if(material == 2.) {
outMaterial = vec3(0.3255, 0.4784, 0.3255); outMaterial = vec3(0.3255, 0.4784, 0.3255);
shininess = .2; shininess = .2;
@ -180,25 +219,24 @@ vec3 shading(vec3 v, vec3 n, vec3 dir, float material) {
shininess = 1.0; shininess = 1.0;
} else if(material == 4.) { } else if(material == 4.) {
outMaterial = vec3(0.9961, 1.0, 0.9922); outMaterial = vec3(0.9961, 1.0, 0.9922);
shininess = .3; shininess = .1;
} } else if(material == 5.) {
else if(material == 5.) {
outMaterial = vec3(0.9961, 1.0, 0.9922); outMaterial = vec3(0.9961, 1.0, 0.9922);
shininess = .3; shininess = .3;
} }
vec3 lights = vec3(0.); vec3 lights = vec3(0.);
// lights += addPointLight(vec3(-2., 10., 0.), vec3(0.73, 0.73, 0.64), shininess, v, dir, n, occ); lights += addPointLight(vec3(-10., 10.0, 0.), vec3(0.77, 0.26, 0.73), 3.0, v, dir, n, shininess);
lights += addPointLight(vec3(-2., 10., -5.), vec3(0.77, 0.26, 0.73) * 1., shininess, v, dir, n, occ); lights += addPointLight(vec3(0., 10.0, -5.0), vec3(0.08, 0.62, 0.75), 3.0, v, dir, n, shininess);
lights += addPointLight(vec3( 20., 10.0, -5.0 ),vec3(0.08, 0.62, 0.75)*1., shininess, v, dir, n, occ); lights += addPointLight(vec3(0., 25.0, 0.0), vec3(0.5137, 0.1961, 0.7725), 3.0, v, dir, n, shininess);
vec3 lightDir = vec3(0., 1., 6.); vec3 lightDir = vec3(0., 1., -3);
//float sun_dif = clamp(dot(n, lightDir), 0., 1.); //float sun_dif = clamp(dot(n, lightDir), 0., 1.);
//float shadow = softshadow(v + n * 0.01, lightDir, .01, 30., 18.); //float shadow = softshadow(v + n * 0.01, lightDir, .01, 30., 18.);
//lights += vec3(0.6431, 0.7804, 0.8588) * sun_dif * shadow * occ; //lights += vec3(0.6431, 0.7804, 0.8588) * sun_dif * shadow * occ;
float ind = clamp(dot(n, normalize(lightDir * vec3(.0, -1.0, -1.0))), 0.0, 1.0); float ind = clamp(dot(n, normalize(lightDir * vec3(.0, -1.0, -2.0))), 0.0, 1.0);
lights += vec3(0.1255, 0.1255, 0.1255) * ind; lights += vec3(0.08, 0.62, 0.75) * ind * 0.8;
return outMaterial * max(vec3(0.), lights); return outMaterial * max(vec3(0.), lights);
} }
@ -209,7 +247,7 @@ vec3 postProcess(vec3 col) {
//col += 0.075*clamp(vec3(0.5*random, 0.5*random2, 0.5*random), 0.02, 1.); // dither //col += 0.075*clamp(vec3(0.5*random, 0.5*random2, 0.5*random), 0.02, 1.); // dither
// Normalized pixel coordinates (from 0 to 1) // Normalized pixel coordinates (from 0 to 1)
vec2 screenCoord = getUV(vec2(0., 0.)); //gl_FragCoord.xy / u_resolution.xy; vec2 screenCoord = getUV();
// Vignette // Vignette
float radius = 0.8; float radius = 0.8;
@ -234,73 +272,67 @@ vec3 postProcess(vec3 col) {
return col; return col;
} }
vec3 getCameraRayDir(vec2 uv, vec3 camPos, vec3 camTarget) { vec3 getCameraRay(vec2 uv, vec3 camPos, vec3 camTarget, float fov) {
// Calculate camera's "orthonormal basis", i.e. its transform matrix components // Calculate camera's orthonormal basis
vec3 camForward = normalize(camTarget - camPos);
vec3 camRight = normalize(cross(vec3(.0, 1.0, 0.0), camForward));
vec3 camUp = normalize(cross(camForward, camRight));
float fov = 0.7;
vec3 vDir = normalize(uv.x * camRight + uv.y * camUp + camForward * fov);
return vDir;
}
vec3 getCameraRayDir2(vec2 uv, vec3 camPos, vec3 lookAt, float zoom) {
vec3 f = normalize(lookAt - camPos);
vec3 r = cross(vec3(0.0, 1.0, 0.0), f);
vec3 u = cross(f, r);
vec3 c = camPos + f * zoom;
vec3 i = c + uv.x * r + uv.y * u;
return normalize(i - camPos);
}
vec3 getCameraFov(vec2 uv, vec3 camPos, vec3 camTarget) {
vec3 camForward = normalize(camTarget - camPos); vec3 camForward = normalize(camTarget - camPos);
vec3 camRight = normalize(cross(vec3(0.0, 1.0, 0.0), camForward)); vec3 camRight = normalize(cross(vec3(0.0, 1.0, 0.0), camForward));
vec3 camUp = normalize(cross(camForward, camRight)); vec3 camUp = normalize(cross(camForward, camRight));
float fov = 1.7;
// Depth of field vec3 rayDir = normalize(uv.x * camRight + uv.y * camUp + camForward * fov);
float dof = .3;
vec2 h = vec2(noise(gl_FragCoord.xy, u_time * 0.1)); return rayDir;
vec3 voff = sqrt(h.x) * (camRight * sin(h.y * 6.283) + camUp * cos(h.y * 6.283)) * dof;
voff -= camTarget;
float focusdistance = 50.;
return normalize(uv.x * camRight + uv.y * camUp + fov * camForward + voff * fov / focusdistance);
} }
vec3 render(vec2 uv) { // Camera positioning function
vec3 getCameraPosition(float time, int cameraMode) {
vec3 camPos;
camPos = vec3(0.0, 30.0, -10.0);
bool useDof = !true; if(cameraMode == 1) {
// camera // Orbiting camera
vec3 camTarget = vec3(0.0, 0.0, -20.0);
vec3 camTarget = vec3(15., 20., -20.); // Center point to orbit around float orbitRadius = 20.0;
float orbitRadius = 20.0; // Distance from target float orbitSpeed = 0.2;
float orbitSpeed = 0.2; // Speed of orbit float orbitHeight = 10.0;
float orbitHeight = 5.0; // Height above target float angle = time * orbitSpeed;
camPos = camTarget + vec3(cos(angle) * orbitRadius, orbitHeight + sin(time * 0.8) * 2.0, sin(angle) * orbitRadius);
// Calculate orbiting position } else if(cameraMode == 2) {
float angle = 0. * orbitSpeed; // Smooth camera movement
vec3 camPos = camTarget + vec3( float t = time * 0.06;
cos(angle) * orbitRadius, camPos = vec3(sin(t) * 15.0, 30.0 + cos(t * 0.5) * 5.0, cos(t) * 15.0);
orbitHeight + sin(0. * 0.8) * 2.0, // Optional vertical movement } else if(cameraMode == 3) {
sin(angle) * orbitRadius // First person style movement
); float walkSpeed = 2.0;
camPos = vec3(sin(time * walkSpeed) * 0.1, 8.0 + sin(time * walkSpeed * 2.0) * 0.05, time * 0.5);
vec3 rayDir;
// make orbit cam
if(useDof) {
rayDir = getCameraFov(uv, camPos, camTarget);
} else {
rayDir = getCameraRayDir2(uv, camPos, camTarget, 1.0);
} }
vec3 col = vec3(0.102, 0.2431, 0.3412); return camPos;
}
vec3 hitPos = vec3(0.); // Main camera function that combines everything
vec3 setupCamera(vec2 uv, float time, int positionMode) {
vec3 camPos = getCameraPosition(time, positionMode);
vec3 camTarget = vec3(0.0, -1.0, 10.0); // Adjust target as needed
float fov = 1.;
return getCameraRay(uv, camPos, camTarget, fov);
}
// Simplified version of your render function using the new camera system
vec3 render(vec2 uv) {
// Choose camera modes:
// Position: 0=static, 1=orbit, 2=smooth, 3=walk
// Ray: 0=standard, 1=zoom, 2=dof
int positionMode = 2; // Static
vec3 rayDir = setupCamera(uv, u_time, positionMode);
vec3 camPos = getCameraPosition(u_time, positionMode);
vec3 col = vec3(0.102, 0.2431, 0.3412);
vec3 hitPos = vec3(0);
vec3 t = castRay(camPos, rayDir, hitPos); vec3 t = castRay(camPos, rayDir, hitPos);
if (t.z == 1.) { if(t.x > 0.0) {
vec3 nor = calcNormal(hitPos); vec3 nor = calcNormal(hitPos);
col = shading(hitPos, nor, rayDir, t.y); col = shading(hitPos, nor, rayDir, t.y);
} }
@ -310,7 +342,7 @@ vec3 render(vec2 uv) {
void main() { void main() {
vec3 finalColor = render(getUV(vec2(0., 0.))); vec3 finalColor = render(getUV());
//finalColor = postProcess(finalColor); //finalColor = postProcess(finalColor);

View File

@ -1,152 +1,151 @@
// Generated with Shader Minifier 1.5.1 (https://github.com/laurentlb/Shader_Minifier/) // Generated with Shader Minifier 1.5.1 (https://github.com/laurentlb/Shader_Minifier/)
#ifndef FRAGMENT_INL_ #ifndef FRAGMENT_INL_
# define FRAGMENT_INL_ # define FRAGMENT_INL_
# define VAR_fft_output "m" # define VAR_fft_output "n"
# define VAR_o "f" # define VAR_o "f"
# define VAR_syncs "n" # define VAR_syncs "m"
const char *fragment_frag = const char *fragment_frag =
"#version 460\n" "#version 460\n"
"precision mediump float;" "precision mediump float;"
"out vec4 f;" "out vec4 f;"
"const float i=2.*acos(-1.),v=sqrt(5.)*.5+.5;" "const float i=2.*acos(-1.),v=sqrt(5.)*.5+.5;"
"layout(location=0)uniform float n[7];" "layout(location=0)uniform float m[7];"
"layout(location=8)uniform float m[512];" "layout(location=8)uniform float n[512];"
"float x=n[0];" "float c=m[0];"
"vec2 t()" "float t(vec3 v,vec2 i)"
"{"
"vec2 f=2.*((gl_FragCoord.xy+vec2(0)*.5)/vec2(1920,1080)-.5);"
"f.x*=1;"
"return f;"
"}"
"float t(vec2 f)"
"{"
"return fract(tan(x*.1*length(f*v-f))*f.x);"
"}"
"float t(vec3 v,vec2 f)"
"{" "{"
"v=abs(v);" "v=abs(v);"
"return max(v.y-f.y,max(v.x*sqrt(3.)*.5+v.z*.5,v.z)-f.x);" "return max(v.y-i.y,max(v.x*sqrt(3.)*.5+v.z*.5,v.z)-i.x);"
"}"
"float t(int v)"
"{"
"v=clamp(v,0,511);"
"float i=n[v];"
"return log(1.+i*15.);"
"}" "}"
"vec2 t(vec3 v)" "vec2 t(vec3 v)"
"{" "{"
"float f=0.,i=1e9,r=0.;" "float i=0.,f=1e9,m=0.;"
"vec3 x=v;" "vec2 n=vec2(7);"
"float e=0.;" "for(float r=0.;r<16.;r++)"
"for(float c=0.;c<15.;c++)"
"{" "{"
"x=v+vec3(11.25,0,7.5)+vec3(0,0,2.08*c);" "vec3 c=v+vec3(1.8*8,-5,-2.08*10)+vec3(0,0,2.08*r);"
"for(float v=0.;v<15.;v++)" "for(float v=0.;v<16.;v++)"
"{" "{"
"x=mod(v,2.)==0.?" "c=mod(v,2.)==0.?"
"x-vec3(1.8,0,1):" "c-vec3(1.8,0,1):"
"x+vec3(-1.8,0,1);" "c+vec3(-1.8,0,1);"
"float n=m[int(v+1)*int(c+1)]*5.;" "int y=int(length(vec2(v,r)-n.xy));"
"r=t(x,vec2(.86,1.+n));" "m=t(c,vec2(.86,1.+t(y)*2.));"
"i=min(i,r);" "f=min(f,m);"
"if(i==r)" "if(f==m)"
"f=4.;" "i=1.;"
"e+=1.;"
"}" "}"
"}" "}"
"return vec2(i,f);" "return vec2(f,i);"
"}" "}"
"vec3 t(vec3 v,vec3 f,inout vec3 i)" "vec3 t(vec3 v,vec3 i,inout vec3 f)"
"{" "{"
"float x=0.,r=0.,y=0.;" "float r=0.,m=0.,y=0.;"
"for(int e=0;e<24;e++)" "for(int c=0;c<30;c++)"
"{" "{"
"i=v+f*x;" "f=v+i*r;"
"vec2 n=t(i);" "vec2 n=t(f);"
"x+=n.x*1.2;" "r+=n.x;"
"r=n.y;" "m=n.y;"
"if(x>60.)" "if(r>1e2)"
"break;" "break;"
"if(n.x<.001*x)" "if(n.x<.001*r)"
"{" "{"
"y=1.;" "y=1.;"
"break;" "break;"
"}" "}"
"}" "}"
"if(x>60.)" "if(r>1e2)"
"x=0.;" "r=0.;"
"return vec3(x,r,y);" "return vec3(r,m,y);"
"}" "}"
"float t(vec3 v,vec3 f)" "float t(vec3 v,vec3 i,float y)"
"{" "{"
"float i=1.,x=.01;" "float f=1.,r=.02;"
"for(int e=0;e<6;e++)" "for(int c=0;c<6;c++)"
"{" "{"
"if(x>30.)" "if(r>y)"
"break;" "break;"
"float n=t(v+x*f).x;" "float m=t(v+r*i).x;"
"i=min(i,n/(8.*x));" "f=min(f,m/(4.*r));"
"x+=clamp(n,.1,.8);" "r+=clamp(m,.1,.8);"
"if(i<-1.)" "if(f<-1.)"
"break;" "break;"
"}" "}"
"i=max(i,-1.);" "f=max(f,-1.);"
"return.25*(1.+i)*(1.+i)*(2.-i);" "return.25*(1.+f)*(1.+f)*(2.-f);"
"}" "}"
"vec3 e(vec3 v)" "vec3 e(vec3 v)"
"{" "{"
"vec2 f=vec2(.01,0);" "vec2 i=vec2(.01,0);"
"return normalize(vec3(t(v+f.xyy).x-t(v-f.xyy).x,t(v+f.yxy).x-t(v-f.yxy).x,t(v+f.yyx).x-t(v-f.yyx).x));" "return normalize(vec3(t(v+i.xyy).x-t(v-i.xyy).x,t(v+i.yxy).x-t(v-i.yxy).x,t(v+i.yyx).x-t(v-i.yyx).x));"
"}" "}"
"vec3 e(vec3 v,vec3 f,float i,vec3 x,vec3 n,vec3 y)" "vec3 e(vec3 v,vec3 i,vec3 f,vec3 r,vec3 c,float m)"
"{" "{"
"vec3 r=normalize(x);" "v-=f;"
"return f*mix(vec3(1)*vec3(max(0.,dot(r,y))),vec3(max(0.,dot(r,reflect(n,y)))),vec3(.4545)+(1.-vec3(.4545))*pow(clamp(1.-dot(normalize(r-n),r),0.,1.),5.))*t(x+y*.054,v);" "float y=length(v);"
"v=normalize(v);"
"float n=3./(1.+.09*y+.032*y*y),p=max(dot(c,v),0.);"
"r=normalize(v-r);"
"vec3 e=vec3(.04);"
"e+=(1.-e)*pow(clamp(1.-max(dot(r,v),0.),0.,1.),5.);"
"y=t(f+c*.01,v,y);"
"return(i*p*n+i*pow(max(dot(c,r),0.),mix(128.,8.,m))*n*e)*y;"
"}" "}"
"vec3 e(vec3 v,vec3 f,vec3 i,float x)" "vec3 e(vec3 v,vec3 f,vec3 i,float y)"
"{" "{"
"float n=.1;" "float m=.01;"
"vec3 y=vec3(0);" "vec3 c=vec3(0);"
"if(x==0.)" "if(y==0.)"
"y=vec3(.8314,.2941,.2941),n=.5;" "c=vec3(.8314,.2941,.2941),m=.1;"
"else if(x==1.)" "else if(y==1.)"
"y=vec3(.6275,.1569,.9412),n=2.;" "c=vec3(.6196,.6118,.6118),m=.7;"
"else if(x==2.)" "else if(y==2.)"
"y=vec3(.3255,.4784,.3255),n=.2;" "c=vec3(.3255,.4784,.3255),m=.2;"
"else if(x==3.)" "else if(y==3.)"
"y=vec3(.2471,.3059,.6314),n=1.;" "c=vec3(.2471,.3059,.6314),m=1.;"
"else if(x==4.)" "else if(y==4.)"
"y=vec3(.9961,1,.9922),n=.3;" "c=vec3(.9961,1,.9922),m=.1;"
"else if(x==5.)" "else if(y==5.)"
"y=vec3(.9961,1,.9922),n=.3;" "c=vec3(.9961,1,.9922),m=.3;"
"v=vec3(0)+e(vec3(-2,10,-5),vec3(.77,.26,.73),n,v,i,f)+e(vec3(20,10,-5),vec3(.08,.62,.75),n,v,i,f)+vec3(.1255)*clamp(dot(f,normalize(vec3(0,1,6)*vec3(0,-1,-1))),0.,1.);" "v=vec3(0)+e(vec3(-10,10,0),vec3(.77,.26,.73),v,i,f,m)+e(vec3(0,10,-5),vec3(.08,.62,.75),v,i,f,m)+e(vec3(0,25,0),vec3(.5137,.1961,.7725),v,i,f,m)+vec3(.08,.62,.75)*clamp(dot(f,normalize(vec3(0,1,-3)*vec3(0,-1,-2))),0.,1.)*.8;"
"return y*max(vec3(0),v);" "return c*max(vec3(0),v);"
"}" "}"
"vec3 e(vec2 f,vec3 v,vec3 x)" "vec3 e(vec2 v,vec3 f)"
"{" "{"
"x=normalize(x-v);" "f=normalize(vec3(0,-1,10)-f);"
"vec3 n=cross(vec3(0,1,0),x);" "vec3 m=normalize(cross(vec3(0,1,0),f));"
"return normalize(v+x+f.x*n+f.y*cross(x,n)-v);" "return normalize(v.x*m+v.y*normalize(cross(f,m))+f);"
"}" "}"
"vec3 t(vec2 v,vec3 x,vec3 f)" "vec3 e()"
"{" "{"
"x=normalize(f-x);" "vec3 f;"
"vec3 n=normalize(cross(vec3(0,1,0),x)),y=normalize(cross(x,n));" "{"
"vec2 i=vec2(t(gl_FragCoord.xy));" "float v=c*.06;"
"return normalize(v.x*n+v.y*y+1.7*x+(sqrt(i.x)*(n*sin(i.y*6.283)+y*cos(i.y*6.283))*.3-f)*1.7/50.);" "f=vec3(sin(v)*15.,30.+cos(v*.5)*5.,cos(v)*15.);"
"}"
"return f;"
"}" "}"
"vec3 e(vec2 v)" "vec3 e(vec2 v)"
"{" "{"
"bool n=!true;" "vec3 f=e(v,e()),m=vec3(.102,.2431,.3412),y=vec3(0),i=t(e(),f,y);"
"vec3 f=vec3(15,20,-20),x=f+vec3(cos(0.)*20.,5.+sin(0.)*2.,sin(0.)*20.),i=n?" "if(i.x>0.)"
"t(v,x,f):"
"e(v,x,f),r=vec3(.102,.2431,.3412),y=vec3(0);"
"f=t(x,i,y);"
"if(f.z==1.)"
"{" "{"
"vec3 v=e(y);" "vec3 v=e(y);"
"r=e(y,v,i,f.y);" "m=e(y,v,f,i.y);"
"}" "}"
"return r;" "return m;"
"}" "}"
"void main()" "void main()"
"{" "{"
"vec3 v=e(t());" "vec3 v=e(gl_FragCoord.xy*vec2(.00104166667,.00185185185)-1.);"
"f=vec4(v,1);" "f=vec4(v,1);"
"}"; "}";

View File

@ -13,7 +13,7 @@
#define SU_LENGTH_IN_PATTERNS 108 #define SU_LENGTH_IN_PATTERNS 108
#define SU_LENGTH_IN_ROWS (SU_LENGTH_IN_PATTERNS*SU_PATTERN_SIZE) #define SU_LENGTH_IN_ROWS (SU_LENGTH_IN_PATTERNS*SU_PATTERN_SIZE)
#define SU_SAMPLES_PER_ROW (SU_SAMPLE_RATE*60/(SU_BPM*SU_ROWS_PER_BEAT)) #define SU_SAMPLES_PER_ROW (SU_SAMPLE_RATE*60/(SU_BPM*SU_ROWS_PER_BEAT))
#define SU_NUMSYNCS 4 #define SU_NUMSYNCS 2
#define SU_SYNCBUFFER_LENGTH ((SU_LENGTH_IN_SAMPLES+255)>>8)*SU_NUMSYNCS #define SU_SYNCBUFFER_LENGTH ((SU_LENGTH_IN_SAMPLES+255)>>8)*SU_NUMSYNCS
#include <stdint.h> #include <stdint.h>