GLSL Sandbox
category: code [glöplog]
Quote:
Intel 945 mobile
You don't say!
GMA9x0 lacks some of the the fundamental features you'd come to expect of a GPU from over a decade ago and cheerily fails to emulate that in software. Drivers are shit to boot.
Shifter: you missed the bit where it cheerily tells you that it does indeed support those features, then when you try to use them it emulates them in software causing massive slowdown if you're lucky and a crash if you're not. I fucking hate that GPU :)
Nothing fancy, but it proves how useful this site could be :) Was discussing gravity waves and how they work with somebody elsewhere on the internet, and made a quick riff on the old interference circles effect to illustrate: http://glsl.heroku.com/121/4
Bug report: I'm getting that "upside down image" in a pretty major way. I just opened this one: http://glsl.heroku.com/121/5 in firefox 5.0.1 (currently downloading update) on OSX 10.7.2, with a radeon 2600.
Not sure if the main image is upside down or not, but if I blend with the backbuffer I see 4 circles instead of 2 in the centre (i.e. back buffer is being flipped vertically). Turning off blending I get 2 as expected. If I display only the back buffer and set the scaling to 0.5 I get major flicker as it flips per frame. I'm pretty certain this didn't happen with chrome at work, also on 10.7.2 but with a recent GPU.
OK, firefox updated... 7.0.1... same glitch... and there's another update. I hate software that pulls this kind of shit. Right, 8.0. Same glitch, and webgl seems much slower :(
Let me know if you want me to test anything or whatever.
Not sure if the main image is upside down or not, but if I blend with the backbuffer I see 4 circles instead of 2 in the centre (i.e. back buffer is being flipped vertically). Turning off blending I get 2 as expected. If I display only the back buffer and set the scaling to 0.5 I get major flicker as it flips per frame. I'm pretty certain this didn't happen with chrome at work, also on 10.7.2 but with a recent GPU.
OK, firefox updated... 7.0.1... same glitch... and there's another update. I hate software that pulls this kind of shit. Right, 8.0. Same glitch, and webgl seems much slower :(
Let me know if you want me to test anything or whatever.
Apparently things gets fixed magically on MacOS. Check Shifter issues some pages back.
Otherwise, if you're serious about reporting bugs: http://code.google.com/p/chromium/issues/entry
Otherwise, if you're serious about reporting bugs: http://code.google.com/p/chromium/issues/entry
wrong browser ;) If you think it's a firefox issue though, I can report that to them. I'll see what happens first, if it somehow fixes itself after a reboot, or if it's happening in chrome too.
I've done a little thing that sucks... but maybe you could enhance it a bit:
Code:
#ifdef GL_ES
precision highp float;
#endif
uniform float time;
uniform vec2 mouse;
uniform vec2 resolution;
void main( void ) {
vec2 position = ( gl_FragCoord.xy / resolution.xy );
float color = 0.0;
float vx, vy, vz, vxr;
float dx, llx, dy, lly, dz, llz;
int px, py, pz, ccc, P;
float k, k2;
ivec4 di;
vec4 X;
vec4 d=vec4(time,mouse.y*3.0,.0,.0);
vx=(position.x-0.5)+0.0001;
vy=(position.y-0.5)+0.0001;
vz=0.5+.0001;
vxr=(vx*cos(mouse.x*2.5)+vz*sin(mouse.x*2.5));
vz=(-vx*sin(mouse.x*2.5)+vz*cos(mouse.x*2.5));
vx=vxr;
X=fract(d);
dx = 1000.0/vx; dy = 1000.0/vy; dz = 1000.0/vz;
px=1; llx=dx*(1.0-X[0]);
py=16; lly=dy*(1.0-X[1]);
pz=256; llz=dz*(1.0-X[2]);
if (dx<.0) {px=-1; dx=-dx; llx=dx*X[0];}
if (dy<.0) {py=-16; dy=-dy; lly=dy*X[1];}
if (dz<.0) {pz=-256; dz=-dz; llz=dz*X[2];}
ccc=0;
di=ivec4(d[0],d[1],d[2],d[3]);
P=di[2]*256+di[1]*16+di[0];
color=1.0;
for (int i=0; i<40; i++)
{
if ((llx<=lly) && (llx<=llz))
{
P+=px; llx+=dx; k=0.75;
}
else
{
if (lly<=llz)
{
P+=py; lly+=dy; k=0.9;
}
else
{
P+=pz; llz+=dz; k=1.0;
}
}
if ((fract(float(P)/29.0)<.01)&&(color==1.0)) {
color=float(i)/40.0;
k2=k;
}
}
gl_FragColor = vec4(k2*(1.0-color),k2*(1.0-color),k2*k2*(1.0-color),1.0 );
}
You can also report bugs at https://bugs.opera.com/wizarddesktop/. Make sure to put [webgl] in the summary/description so that I can find them easily.
how can i acces older entries in the gallery? someone kinda swamped the gallery with interference circles, you know who you are :)
You can peek at older saves by editing the shader index number in the url as a fallback option, behold my orbs: http://glsl.heroku.com/206/0
Quote:
I'll see what happens first, if it somehow fixes itself after a reboot, or if it's happening in chrome too.
During my visit to upside-downsville in Firefox, Chrome wouldn't run the GLSL sandbox at all. If you had the same problem, that would be wonderful :)
Quote:
how can i acces older entries in the gallery?
working on it :)
Previous and next page links are in place.
Quote:
how can i acces older entries in the gallery? someone kinda swamped the gallery with interference circles, you know who you are :)
Muahahaha! But honestly, not me - I do know the difference between saving a version and forking. I don't know why there are so many versions of that now when there's so much better stuff on there. Maybe it's just simple and easy to tweak?
It's cool to see something getting adapted and remixed loads, not so cool to see somebody hit fork + save without changing anything, guess the site could use something to prevent duplicates if it's not doing so already. Maybe another way to handle it would be to show only the last 3 forks of any particular composition, and have a link to 'other forks' or something?
http://glsl.heroku.com/42/8
http://glsl.heroku.com/58
My minor contributions.
I must admit, that it is really cool to do this in the browser! Props to Iq for doing this first, but the new system, is even better.
http://glsl.heroku.com/58
My minor contributions.
I must admit, that it is really cool to do this in the browser! Props to Iq for doing this first, but the new system, is even better.
I made a change to a shader which completely froze my computer. I had to hard-reset with the power button.
URL: http://glsl.heroku.com/302/0
Change: vz=0.1+1.0006; (line 24, I think).
URL: http://glsl.heroku.com/302/0
Change: vz=0.1+1.0006; (line 24, I think).
Latest Chrome on OSX Lion, latest Macbook Pro 15" with the new AMD graphics.
For people with windows.
It's possible to use the free ATI RenderMonkey to edit shaders, and then just copy-paste the code to GLSL Sandbox.
And vice-versa, you can edit GLSL Sandbox shaders on ATI RenderMonkey.
For old machines with Intel cards, sometimes this option is better, because of drivers problems, ANGLE, and shader compilation problems.
Compile with F5 ;)
Use this rfx RenderMonkey_GLSL_Sandbox.rfx
BackBuffer is not suported in this rfx.
For mouse you have to change:
uniform vec2 mouse;
To:
uniform vec2 _mouse;
And
void main(void){
To:
void main(void){ vec2 mouse=vec2(_mouse.x,-_mouse.y+1.0);
It's possible to use the free ATI RenderMonkey to edit shaders, and then just copy-paste the code to GLSL Sandbox.
And vice-versa, you can edit GLSL Sandbox shaders on ATI RenderMonkey.
For old machines with Intel cards, sometimes this option is better, because of drivers problems, ANGLE, and shader compilation problems.
Compile with F5 ;)
Use this rfx RenderMonkey_GLSL_Sandbox.rfx
BackBuffer is not suported in this rfx.
For mouse you have to change:
uniform vec2 mouse;
To:
uniform vec2 _mouse;
And
void main(void){
To:
void main(void){ vec2 mouse=vec2(_mouse.x,-_mouse.y+1.0);
for people with loosy job's laptop like Lenovo's dirty thinkpad try to play with chrome://flags options, there is one to enable webgl even if your hardware isn't "registered".
that worked for me, now I can do GLSL during the lunch pause :)
that worked for me, now I can do GLSL during the lunch pause :)
Checking the code for changes before allowing save/fork looks good to prevent loads of copies of the same effect. Right now the forks don't save the original effect they where copied from but should be easy to add.
I'll try to do these things after work.
I'll try to do these things after work.
o_O I can't fork/edit the index.html file on github. I get a 404 upon clicking "propose file change" in both Chrome and Opera.
@the vaw: the biggest problem is we can't change "page" to see the oldest entries :((
@rez: there are previos and next page links at the bottom of the page. Aren't they showing to you?
@the vaw: ha fuck yeah! I can see it now! thank a lot :D
Now save/fork button is only enabled when the code has changed from the previous version (or the original effect to fork from). It also saves the id of the parent effect when forking, let's see what we can do with this info.