 
 : normalize-bunny-normals ( vertexes -- )
     [
-        [ bunny-vertex-struct-normal 3 <direct-float-array> normalize ] keep
+        [ bunny-vertex-struct-normal normalize ] keep
         set-bunny-vertex-struct-normal
     ] each ;
 

gpu.shaders gpu.state gpu.textures gpu.util grouping http.client images
images.loader io io.encodings.ascii io.files io.files.temp
kernel math math.matrices math.parser math.vectors
method-chains sequences specialized-arrays.direct.float
specialized-arrays.float specialized-vectors.uint splitting
struct-vectors threads ui ui.gadgets ui.gadgets.worlds
ui.pixel-formats ;
IN: gpu.demos.bunny


: calc-bunny-normal ( vertexes indexes -- )
    swap
    [ [ nth bunny-vertex-struct-vertex ] curry { } map-as normal ]
    [
        [
            nth [ bunny-vertex-struct-normal v+ ] keep
            set-bunny-vertex-struct-normal
        ] curry with each
    ] 2bi ;
