pouët.net

GLSL Sandbox

category: code [glöplog]
rare: it's using the Opengl ES version of GLSL, which might then get translated into HLSL and run under direct x on windows - depending on the browser and driver version I suspect. Maybe one system is running it directly under OpenGL and the other is doing the translation steps (this is the case where it takes forever to compile).

Scan back through the thread, this was discussed not that long ago - and I vaguely recall there being a way to disable the HLSL translation stuff.
added on the 2012-01-20 12:17:08 by psonice psonice
Same browser? Firefucks 8ish
added on the 2012-01-20 13:05:09 by raer raer
Firefox has an option to pass the ESSL shader directly to the GLSL compiler (which is wrong for so many reasons, but can give faster compilation times). Perhaps it's enabled on one of the installs?
added on the 2012-01-20 13:07:40 by kusma kusma
Wait one has FF8, the other FF9, but I'd suspect it is because of the drivers...
added on the 2012-01-20 13:08:11 by raer raer
I never enabled that...
added on the 2012-01-20 13:08:45 by raer raer
for FF -> type about:config in the address bar <enter> (ignore possible warnings.) -> search for webgl.prefer-native-gl and set it to true.
added on the 2012-01-20 13:50:18 by las las
las: Yes, do that if you want a broken WebGL setup.
added on the 2012-01-20 13:59:46 by kusma kusma
why the hell would passing it straight to opengl instead of translating it and running it under dx be *more* broken?!
added on the 2012-01-20 14:07:42 by psonice psonice
I 2nd psonice there...

And you two nailed it. "webgl.prefer-native-gl" is set to true on the machine that has fast compile times. Will try it on the other machine when I come home...

What could be the problem other than posing a major security risk? :)
added on the 2012-01-20 14:12:52 by raer raer
kusma: imho - bullshit.
My experience tells me that angle is just another layer of failure.
Btw. iirc on linux it's native by default.
added on the 2012-01-20 14:22:57 by las las
Quote:

What could be the problem other than posing a major security risk? :)


Broken shader compilers. But given that angle is more broken and that HLSL shader compile times seem to be something like factor 10 worse than GLSL NV shader compile times - I prefer to stick to native.

Given the bad HLSL compile times due to microsoft shader compiler fuckup PLUS the time to run angle on it... Seems those guys never considered shaders with more than 300 lines.
added on the 2012-01-20 14:27:24 by las las
las: what else did you expect on linux, angle + DX running under wine? :D It's native on every platform other than windows so far as I know.
added on the 2012-01-20 14:27:30 by psonice psonice
psonice: Because WebGL isn't OpenGL, that's why. Using the native OpenGL is not only dangerous for security reasons, it's also wrong. Your shaders gets compiled with a compiler that assumes you're talking the wrong dialect.

las: Uhm, no. Less-than-competent programmers thinking that WebGL is OpenGL because of webgl.prefer-native-gl is the scary fail here. ANGLE will improve if people allow it to. Submit patches if you find issues.

People suggesting setting webgl.prefer-native-gl to true in public without a big fat warning-sign is a huge step in the wrong direction.
added on the 2012-01-20 14:48:38 by kusma kusma

Mewler, I need to rename vars LOL

DOF is made this way:

1 - Find the intersection point with your focus plane, in this case the focus plane is the plane at look_at_point- with camera normal (look_at_point-where_you_are)
2 - Jitter where_you_are with using a random disk, the plane of the disk is where_you_are with camera normal
3 - Your new dof ray vector is your new where_you_are to intersection_point

DOf works by adding several rays ( with diferent Jitter positions) for the same pixel calculation, for that i use previous frames.
Genuine interest from a noob: Why is ANGLE necessary? Doesn't every modern Windows computer come with box DX and OGL drivers?
added on the 2012-01-20 14:54:45 by skrebbel skrebbel
s/box/both
added on the 2012-01-20 14:55:31 by skrebbel skrebbel
Quote:

las: Uhm, no. Less-than-competent programmers thinking that WebGL is OpenGL because of webgl.prefer-native-gl is the scary fail here.

Never said that.

Quote:

ANGLE will improve if people allow it to. Submit patches if you find issues.

I'm talking about fucking compile times of the HLSL shader compiler - it's not just angle.
Fixing angle does not fix anything here as long the HLSL shader compiler is a slow piece of crap.
added on the 2012-01-20 14:59:26 by las las
never thought that maybe hlsl compiler is slow cos its actually trying to do a good job optimising? :)
added on the 2012-01-20 15:02:26 by smash smash
kusma: of course there's still gl-es to gl translation - but opengl is a LOT closer to gl-es than dx is. Especially for GLSL, in many cases it's just a case of removing the precision specifiers.
added on the 2012-01-20 15:05:28 by psonice psonice
Quote:
trying

;)
added on the 2012-01-20 15:05:35 by las las
skrebbel: First of all because you generally don't get OpenGL ES 2.0 drivers for Windows, but also because OpenGL drivers are shit, while D3D drivers aren't (hello AMD/Intel).

las: Of course you didn't say that; that was the point I was making. Setting that feature is superhighway to broken WebGL. It's a debugging-feature, not for production use.

About the HLSL compiler; you were the one who singled out ANGLE here, so don't blame me for confusing the two. And there are things that ANGLE currently doesn't do as well/fast as it could (and as a result, the HLSL compiler gets a worse starting-point), especially when you have texturing lookups (or other functions that require derivatives) inside dynamic branching. A lot of these things are fixable, but it takes some time to get there.

psonice: No, OpenGL -> OpenGL ES 2.0 is not a lot closer; from a naive point of view it might seem like that's the case, but in reality it turns out there's just too many showstopper-bugs in the widely-deployed OpenGL drivers out there. For DX, this is not the case.
added on the 2012-01-20 15:39:32 by kusma kusma
Sorry to pull the topic backwards a bit, but is it stupid to suggest that we could use our scene IDs to enter a gallery mode in which we can click 'like' only once for each shader?
added on the 2012-01-20 21:04:45 by fizzer fizzer
kusma, aye, thanks for the info. I also never knew OGL ES wasn't a subset of OGL until today.
added on the 2012-01-23 16:08:49 by skrebbel skrebbel
skrebbel: I didn't say OpenGL ES isn't a subset of OpenGL :P
added on the 2012-01-23 16:11:06 by kusma kusma

login