by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 08 2017 12:35
    skrat commented #39
  • May 07 2017 04:51
    emnh commented #37
  • May 01 2017 12:25
    floybix commented #37
  • May 01 2017 09:48
    emnh commented #37
  • Apr 29 2017 09:19
    emnh opened #39
  • Jan 17 2017 02:58
    kovasb opened #38
  • Jan 16 2017 17:53

    kovasb on refactor

    WIP (compare)

  • Nov 19 2016 07:30
    floybix opened #37
  • Nov 17 2016 12:14
    floybix opened #36
  • Oct 13 2016 00:27
    sgrove closed #23
  • Oct 13 2016 00:27
    sgrove closed #16
  • Oct 13 2016 00:27
    sgrove closed #15
  • Aug 23 2016 23:54
    kovasb commented #35
  • Aug 23 2016 23:54
    kovasb closed #34
  • Aug 23 2016 23:54

    kovasb on master

    add namespace to build-standard… add min/max with vector types … Document & enable testing Whil… and 4 more (compare)

  • Aug 23 2016 23:54
    kovasb closed #35
  • Aug 20 2016 21:09
    rogerallen opened #35
  • Jul 28 2016 13:40
    rogerallen opened #34
  • May 15 2016 04:27
    skrat commented #30
  • May 03 2016 03:19

    kovasb on master

    add min & mix fixes #30 Merge pull request #33 from jar… (compare)

Sean Grove
@sgrove
Wow, very cool re: gamma's glsl + arcadia
Tims Gardner
@timsgardner
yeah it's a party
got it working friday
want to port some shadertoy stuff over
Tims Gardner
@timsgardner
is there a way to analyze the type of an arbitrary glsl gamma term?
the :type key isn't enough for aget, for instance
so is there some gamma function lurking around that walks a term and gives you its type?
Tims Gardner
@timsgardner
aget is difficult
Tims Gardner
@timsgardner
blob
Sean Grove
@sgrove
Niiiiiice
Tims Gardner
@timsgardner
fixed one problem with aget (I think): kovasb/gamma#26
Tims Gardner
@timsgardner
this one's killing me kovasb/gamma#27
Tims Gardner
@timsgardner
I love that shader composition is update-in
Matthew Chadwick
@Hendekagon
hi, I would like to use 2 textures in a shader, one to provide an index to lookup a colour in the other. Or, I could provide an array of vec4 for the colourmap ? Not sure how to procede
Kovas Boguta
@kovasb
@Hendekagon unless you absolutely need to use a texture, much simpler to provide the colors via attributes
@Hendekagon the main reason to use a texture is if you want to use the GPU to compute the colors in the texture, and then reuse those in another shader pass
Kovas Boguta
@kovasb
@timsgardner the ast constructor fns are responsible for attaching a :type to the term
which typically includes looking at the types of the arguments and figuring out based on that
that part of the code is definitely due for another pass
Tims Gardner
@timsgardner
Can't figure out how to use the imperative commands (set*, set+, etc), is that documented somewhere?
Kovas Boguta
@kovasb
you aren't supposed to use them
that breaks composition
Tims Gardner
@timsgardner
is that a hard constraint? getting the sense perf, memory constraints of shaders sometimes recommend/require mutation, and lots of example shaders use it. Would supporting them actually break Gamma across the board, or just have trade-offs similar to using naked mutation in Clojure?
Kovas Boguta
@kovasb
referential transparency is the name of the game. if your code violates that, its at risk of breaking
do you have an actual use case or is this a theoretical concern?
theres some plans to support encapsulating mutatative stuff in custom ast nodes but i havent gotten to it
Tims Gardner
@timsgardner
Thanks. Somewhere between theoretical and actual use case. Porting shaders from ShaderToy quickly bumps into imperative stuff. That can be expressed functionally with some massaging, but the best I can think of for loop-like things is a kind of tortured use of iterate which seems to entail more allocations than necessary. As usual, perf concerns would be more convincing with good benchmark data (which might be a chore in itself, I don't have experience benchmarking shaders). GLSL also seems to have stringent limitations on the length of programs (4096 instruction slots), and I would imagine imperative stuff involves fewer instructions. I don't have the evidence right now to argue for prioritizing this issue if implementing its solution would be a big pain, but if there's an innocuous and easily-delegable way to get ast-encapsulated mutation and you're busy I could give it a go.
Carlos Scheidegger
@cscheid
Sorry to barge in from an extended lurking period. But fwiw, this is something I've struggled with in Lux as well, and my hacky solution was also to encode simple for loops in a sublanguage of iterators, transformers and folds.
it gets really ugly when you try to do nested loops, and scoping in the AST becomes in the GLSL translation.
johann bestowrous
@jobez
Tims Gardner
@timsgardner
Here's an example of a shader snippet from the wild:
Kovas Boguta
@kovasb
@cscheid in Gamma its very easy to unroll "loops" yourself, see examples at bottom of https://github.com/kovasb/gamma/wiki/API-Guide
seems good enough for WebGL, where loops are unrolled anyway
@timsgardner its possible to hide imperative stuff behind a value-oriented interface
@timsgardner i'd like to have an easy way to add proper GLSL functions as user-pluggable AST nodes
@jobez potentially yes
Tims Gardner
@timsgardner
sorry, that snippet didn't post last night, here it is: https://gist.github.com/timsgardner/929ab154f9335f7c057b
Tims Gardner
@timsgardner
well hrm I'll get to why that seemed interesting at 4:00 am last night later today. @kovasb , ya, I can just do the usual imperative->functional thing, and GLSL pluggable functions would of course really help port stuff, that's super exciting.
Sean Grove
@sgrove
Wonder where Gamma might fit in with Vulkan https://www.youtube.com/watch?v=quNsdYfWXfM
Sean Grove
@sgrove
@kovasb I'm going to be jamming through rebuilding Gamma PG this weekend for my talk coming up, you going to be around?
Dave Jeffrey
@lepoetemaudit
Hi, really enjoying gamma, but I'm a bit stuck on discarding in the fragment shader, i.e. with (g/discard). I understand it's a little problematic to express non-imperatively but is this currently possible?
Tims Gardner
@timsgardner
whoa didn't know about that one
"It does have a new jump command (effectively): discard"
I've been wanting a g/loop construct, maybe this functionality would/could be sort-of-covered by that?
Matthew Chadwick
@Hendekagon
I'm getting failed to compile fragment-shader:ERROR: 0:2: '' : No precision specified for (float)
Matthew Chadwick
@Hendekagon
'ts ok sorted it
Matthew Chadwick
@hendekahedron_twitter
hi, is there an example of using Gamma to do ping-pong style gpgpu computation ?
Roger Allen
@rogerallen
Hello. I have a n00b question that I can't figure out. How do you run the tests in constructors.cljs? What commandline do you use?
Matthew Chadwick
@Hendekagon
can gamma generate glsl functions other than main ?
Matthew Chadwick
@Hendekagon
no worries - can use lambdas very cool