This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

## 2016-12-22

## Channels

- # adventofcode (1)
- # beginners (172)
- # boot (47)
- # cider (7)
- # cljs-dev (30)
- # cljsrn (43)
- # clojure (180)
- # clojure-dusseldorf (1)
- # clojure-greece (1)
- # clojure-italy (3)
- # clojure-russia (41)
- # clojure-spec (67)
- # clojure-uk (101)
- # clojurescript (128)
- # core-async (4)
- # cursive (13)
- # datomic (29)
- # devcards (5)
- # emacs (19)
- # events (1)
- # hoplon (38)
- # lein-figwheel (1)
- # luminus (8)
- # midje (1)
- # off-topic (47)
- # om (10)
- # onyx (23)
- # protorepl (1)
- # re-frame (11)
- # reagent (7)
- # ring (3)
- # ring-swagger (9)
- # rum (6)
- # sql (5)
- # untangled (4)

interesting intro to geometric algebra (builds off of linear algebra): https://bitworking.org/news/ga/2d

@johnmarinellii i've been thinking about using a rendering method like http://iquilezles.org/www/articles/distfunctions/distfunctions.htm which allows you to specify geometry (specifically 2d manifolds in embedded in 3d in this case) as a signed distance function and is able to render it p quickly purely in a shader

the nice thing about that is now you can introduce an algebra over the shapes like union and subtract over them and it's v intuitive

^ as you can see, subtraction is just an intersection with the 'negative' of a shape which is really awesome, and then you render it purely in GLSL

@nikki very interesting

i don’t understand how one can render with just a functioN?

i have a very vague idea of it

so how GLSL works is there are two parts (there can be more but for now let's look at two)

the first part is you send 'vertices' and their connectivity to the gpu, and it is able to transform them

the second part defines how each pixel (actually an abstraction over a pixel called a 'fragment') is colored

this algo basically uses a trivial vertex shader that just renders a fullscreen quad, that's it

and at each pixel we shoot a ray in the direction corresponding to that given your camera

and given the signed distance function we can compute the surface: it basically steps forward by the minimum distance to the scene at each point until it hits the surface

http://iquilezles.org/www/material/nvscene2008/rwwtt.pdf describes the algo

that’s really cool

i actually started learning ogl a couple of months ago, so this is very intriguing to me

so is this raytracing?

this is a form of raytracing yea, the main difference is the intersection algo and the way the scene is stored

so like if you have dist(x, y, z) if you do dist(x, y, mod(z, 10)) you actually repeat the same scene every 10 units of z

i see, so it’s kind of like a negative imprint

want to play with this eventually but right now i'm working on a layer below it, and just thinking about this haha

are you doing it in clojure ?

if you want to play with ogl in cljs, http://regl.party is a good way imo

it removes the need to do all the stateful calls like `gl.createShader`

and `gl.bind<Blah>`

etc. and just have a data-ific description of your rendering pipeline

but it has the same surface area as straight WebGL, just in much more abbreviated and declarative form

I work on (at 'work') a javascript runtime basically and the last thing i was doing was exposing OpenGL to it in a WebGL API