Live data from Hacker News

Write shaders for the (sim) Vegas sphere

whenistheweekend.com

31–40 of 91 posts

Re: Write shaders for the (sim) Vegas sphere

#31
post #27

Offtopic but what fascinates me is how big of an actual engineering project The Sphere is. From the structure itself to the syncing thousands of LED panels inside the sphere and outside the sphere, while keeping them cooled in Vegas while keeping it cool enough and ventilated inside for a seating capacity of 18 000 people. There are run-of-the mill office buildings which fail to provide adequate ventilation.

All that effort, all those resources, just to get more eyeballs on ads.

The show currently running inside the sphere is focused on the negative human impact to the environment. So clearly the owners of the sphere are interested in spreading that narrative, if that helps you feel better about their use of resources.

Obviously selling ads is a mechanism to pay the bills and defray the massive building costs. It’s not like the rest of Vegas is some sort of moral high ground, so ads on its exterior kind of fits right in.

Re: Write shaders for the (sim) Vegas sphere

#34

Here's a static penrose tiling. https://gist.github.com/vjeranc/265db912d4004c7c0b0f16ae5fda... Interestingly, sphere is not infinite so having this aperiodic tiling is pointless (still looks nice). Although, I never found out if there's a similar set of tiles (or a monotile) that can tile an infinite cone.

might be interesting to slowly 'move' the sphere through infinite aperiodic tiled plane.

    vec2 st = (vUv.xy * h + time/100. + 1.);
This will move it with time.

The tiling is not infinite, it's inside a big triangle, so with enough time you will travel outside of it, but I guess with proper bounds you can move around or make the triangle bigger.

   vec2 st = (vUv.xy * h/(1.+0.5*cos(time)) + time/100. + 1.);
Periodic zooming. Looks like the sphere gets dressed in a cape.

Re: Write shaders for the (sim) Vegas sphere

#35

Here's a static penrose tiling. https://gist.github.com/vjeranc/265db912d4004c7c0b0f16ae5fda... Interestingly, sphere is not infinite so having this aperiodic tiling is pointless (still looks nice). Although, I never found out if there's a similar set of tiles (or a monotile) that can tile an infinite cone.

> cone For physical tiles, clearly not as the curvature would be wrong. I'm sure there remain interesting questions, but it's not sufficiently obvious to me what projection makes sense that I'm able to get further into the problem.

[deleted]

Re: Write shaders for the (sim) Vegas sphere

#36
post #11

Earlier quoted context omitted.

This doesn't work. Did you try it beforehand?

[dead]

Wow, that's cool! I asked ChatGPT "The fragment coloring is currently greyscale, update the fragment coloring to create a rainbow effect." and it created this excellent animated rainbow effect, first try:

https://pastebin.com/raw/NtYuJv1m

It looks especially good with the changing colours highlighting the bloom effect

Re: Write shaders for the (sim) Vegas sphere

#37
post #31

Earlier quoted context omitted.

All that effort, all those resources, just to get more eyeballs on ads.

The show currently running inside the sphere is focused on the negative human impact to the environment. So clearly the owners of the sphere are interested in spreading that narrative, if that helps you feel better about their use of resources. Obviously selling ads is a mechanism to pay the bills and defray the massive building costs. It’s not like the rest of Vegas is some sort of moral high ground, so ads on its e…

>Obviously selling ads is a mechanism to pay the bills and defray the massive building cost.

what came first, the chicken or the egg?

>It’s not like the rest of Vegas is some sort of moral high ground, so ads on its exterior kind of fits right in.

that's certainly true, but driving next to the thing is a bit makes you realize that even for Vegas it's a tad bit excessive. Right time of night with the right animation leaves you essentially light-blinded for a few moments.

Re: Write shaders for the (sim) Vegas sphere

#38
Never played with shaders before, made a spinning watermelon.

    uniform float time;
    varying vec2 vUv;
    
    void main() {
        vec2 st = vUv.xy;
        float f1 = length(abs(2.0*st)/2.0 - .1*time);
        float stripe = fract(f1*10.0);
        float stripe2 = stripe*stripe*stripe;
        float stripe3 = fract(-f1*10.0);
        float stripe4 = stripe3*stripe3*stripe3;
    
        float f2 = length(abs(4.0*st)/2.0 - .2*time);
        float stripe5 = fract(f2*10.0);
        float stripe6 = stripe5*stripe5*stripe5;
        float stripe7 = fract(-f2*10.0);
        float stripe8 = stripe7*stripe7*stripe7;
    
        gl_FragColor = vec4(vec3(0.02, 0.3, 0.01)+vec3(0.3, 0.02, 0.0)*(stripe2 + stripe4 + 0.5*stripe6 + 0.6*stripe8), 1.0);
    }
I'm really not sure how it works? Like I gather that I'm doing something with rgb tuples and frac() appears to be a remainder operation and that's why I square it and add it to itself to create some smooth bands, but what exactly is going on with how shaders work or what uVu is or what gl_FragColor assigns to is rather opaque to me?

Re: Write shaders for the (sim) Vegas sphere

#39
post #38

Never played with shaders before, made a spinning watermelon. uniform float time; varying vec2 vUv; void main() { vec2 st = vUv.xy; float f1 = length(abs(2.0*st)/2.0 - .1*time); float stripe = fract(f1*10.0); float stripe2 = stripe*stripe*stripe; float stripe3 = fract(-f1*10.0); float stripe4 = stripe3*stripe3*stripe3; float f2 = length(abs(4.0*st)/2.0 - .2*time); float stripe5 = fract(f2*10.0); float stripe6 = strip…

It runs your code for every pixel on the canvas. You might like this:

https://www.shadertoy.com/

Re: Write shaders for the (sim) Vegas sphere

#40
post #27

Offtopic but what fascinates me is how big of an actual engineering project The Sphere is. From the structure itself to the syncing thousands of LED panels inside the sphere and outside the sphere, while keeping them cooled in Vegas while keeping it cool enough and ventilated inside for a seating capacity of 18 000 people. There are run-of-the mill office buildings which fail to provide adequate ventilation.

All that effort, all those resources, just to get more eyeballs on ads.

Well that and also to house the gigantic concert venue that's inside of it.
Post reply on HN