rev: 3827f53bae88e48a594610914ba74b9512ead6dd tukan/testing/test_voronoise.sc -rw-r--r-- 652 bytes View raw Log this file
3827f53bae88 — Leonard Ritter * more work on module system 3 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using import glm
using import glsl
using import Array
using import Box
using import struct
using import enum
using import ..tukan.noise
using import .testfragment


fn shader (uv)
    uv := uv * 16.0
    k :=
        voronoise (vec3 uv (shglobals.time * 2.0)) 1.0 1.0
        #gradient-noise (vec3 uv (shglobals.time * 2.0))

    vec4 (vec3 k) 1

inline main ()
    inline per-frame-setup (size pg-test frame)

    _ per-frame-setup shader

fn program ()
    render-fragment-shader main
        #debug = true
        size = (ivec2 512)


static-if true
    program;
else
    define f
        compile
            typify program
            'O3

    f;