Timestamps are in GMT/BST.
| 03:22:41 | | Quartzy has joined |
| 03:39:03 | | Quartzy Quit (Quit: Page closed) |
| 06:12:18 | | LordDVG has joined |
| 06:56:35 | | LordDVG Quit (Remote host closed the connection) |
| 11:59:49 | | raptor has joined |
| 11:59:49 | | ChanServ sets mode +o |
| 11:59:59 | raptor | good day! |
| 12:28:19 | kaen | good day! |
| 12:28:41 | kaen | I put up a couple of new levels: http://bitfighter.org/levels/ |
| 12:28:52 | raptor | i'm sorry i was gone yesterday - I think Sundays are going to be a bit busier for my family from now on... |
| 12:28:59 | raptor | oooo |
| 12:29:01 | kaen | no worries at all |
| 12:29:09 | kaen | I mostly just fooled around this weekend |
| 12:29:10 | kaen | oh! |
| 12:29:17 | kaen | I fixed the worldToScreen helper in the shader |
| 12:29:32 | kaen | so it works at any scalefactor |
| 12:29:34 | raptor | oh? what code pathway did you use? |
| 12:30:02 | kaen | return gl_ModelViewProjectionMatrix * vec4(p, 0.0, 0.0) * 0.5 * screen - gl_ModelViewProjectionMatrix * vec4(base, 0, 0) * 0.5 * screen + 0.5 * screen; |
| 12:30:22 | kaen | essentially, just put the world coords through the GL matrix pipeline |
| 12:30:27 | raptor | ha |
| 12:30:36 | raptor | wait, what is 'screen' in this instance? |
| 12:30:44 | kaen | the screen size in physical pixels |
| 12:31:15 | kaen | GL pipeline maps on the range -1.0, 1.0 |
| 12:31:21 | raptor | ahh, ok |
| 12:31:26 | kaen | so you have to scale it by the screen size to get physical pixels |
| 12:31:43 | kaen | and, I can write an inverse function |
| 12:31:46 | kaen | screenToWorld |
| 12:31:57 | kaen | lets use world distances in shader logic :) |
| 12:32:02 | kaen | lets us use* |
| 12:32:46 | kaen | rather than pixel distances, which would prevent the effects from scaling with the canvas |
| 12:32:56 | raptor | ah ha |
| 12:32:59 | raptor | so question - |
| 12:33:40 | raptor | do you believe that shader usage in this manner will increase performance overall? It seem's, roughly, that a lot more math is being done... |
| 12:34:50 | raptor | i know that the processing is offloaded to the GPU, but would the pre-processing negate the CPU performance gains? |
| 12:35:47 | kaen | possibly, but unlikely without further changes. the math done in the shaders I've shown would mostly be cached by pre-rendering noise textures and reusing them. any remaining math would be SIMD, so it is very well parallelized. |
| 12:36:58 | kaen | I haven't added any CPU-preprocessing that I'm aware of though |
| 12:38:46 | kaen | I do know that when shaders are turned off, performance is identical. The only thing done in that case are some additional boolean checks around the shader-specific bits. |
| 12:39:28 | raptor | yeah, that's negligible |
| 12:40:14 | kaen | I'll admit I'm not in a great position to test the performance concerns. unfortunately I have a top-end consumer gfx card, so anything bitfighter can do will run smoothly for me... |
| 12:41:33 | raptor | it's probably not a real concern - I think GLES 2 compatibility would, by itself, be a great thing |
| 12:42:21 | raptor | 'flourish' looks nice |
| 12:42:47 | raptor | the level screenshots don't look antialiased... |
| 12:43:49 | kaen | hmm, I might have disabled that |
| 12:46:53 | kaen | hmm, can't seem to turn it on |
| 12:47:00 | kaen | I know it's working in other games |
| 12:47:06 | kaen | oh |
| 12:47:16 | kaen | we just use gl smoothing right? |
| 12:47:39 | kaen | iirc that's not implemented for my drivers. Shader FSAA works though :P |
| 12:48:34 | kaen | so for the shader stuff |
| 12:48:39 | kaen | I think it's best for me to just maintain a clone |
| 12:48:40 | raptor | ha! |
| 12:48:45 | raptor | yeah line smoothing |
| 12:49:03 | kaen | until it gets to a state that I can do something useful with it, it looks good, and it has been tested on the different environments |
| 12:49:20 | raptor | now for GLES 2 compatibility - |
| 12:49:25 | kaen | ah yes |
| 12:49:39 | kaen | don't we have some/all of that in the iOS clone? |
| 12:49:43 | raptor | will that pretty much involve moving all the gl calls from gameobjectrender.cpp into shader frags/etc. |
| 12:49:53 | kaen | oh |
| 12:50:10 | raptor | no, the iOS clone sparked GLES 1 compatibility |
| 12:50:13 | kaen | ahh |
| 12:50:18 | kaen | I apparently have some reading to do |
| 12:50:19 | raptor | i made very little overall changes |
| 12:50:23 | kaen | not at all familiar with GLES 2 |
| 12:50:43 | raptor | that is the main goal, in my opinion, of using the shader framework |
| 12:50:56 | kaen | but, it sounds like you have to bind your vertex arrays to attributes manually |
| 12:50:59 | raptor | or at least the next main goal... |
| 12:51:00 | kaen | which is actually trivial |
| 12:51:10 | kaen | but probably tedious |
| 12:51:36 | raptor | yeah - i don't mind the tedium, but i need to understand the whole shader architecture a little bit better |
| 12:51:50 | kaen | I need to understand the requirements of GLES2 better, as well |
| 12:52:29 | raptor | here: https://wiki.maemo.org/OpenGL-ES |
| 12:52:38 | raptor | that is where i started to go from GL -> GLES 1.1 |
| 12:55:07 | kaen | found this on SO: "as GLES 2 is a subset of desktop OpenGL, it is possible to run the same program on both platforms." |
| 12:55:14 | kaen | do you know if that is true? |
| 12:55:37 | kaen | I was thinking we'd have an OGL rendering system and a GLES 2 rendering system |
| 12:55:42 | kaen | switched at compile time |
| 12:56:02 | kaen | but if we can avoid that, we're actually ready for GLES 2 right now |
| 12:56:28 | kaen | sounds like the "hardest" part is wiring up replacements for the default pipeline, which has been in my shader clone since rev 1 |
| 12:57:31 | kaen | all we'd have to do is rewrite the render* methods to bind vert arrays to the shader rather than sending them up with glVertex* |
| 12:58:00 | kaen | huh |
| 12:58:26 | kaen | so yeah, we might actually come out with cpu savings when no fancy shaders are enabled |
| 12:59:08 | kaen | just based uploading vert data in batches to the gpu |
| 13:00:56 | kaen | man I want to hack on the shader stuff so bad right now |
| 13:01:19 | kaen | but I have to deploy 103 more tomcat webapps today :< |
| 13:16:38 | raptor | that is not true |
| 13:16:46 | raptor | oh wait |
| 13:16:58 | raptor | if we code to GLES we can run on desktop <-- that is true |
| 13:17:04 | raptor | but not the otherway around |
| 13:17:09 | kaen | sure, that makes sense |
| 13:17:29 | kaen | I wonder which OGL version added the stuff GLES 2 uses |
| 13:17:36 | raptor | so right now we use GL 1.0... maximumly compatible |
| 13:17:43 | raptor | if that's a word... |
| 13:17:48 | kaen | i.e. what the minimum OGL version is that would support GLES 2 stuff |
| 13:17:50 | raptor | GL 2 addes the GLES stuff |
| 13:17:53 | kaen | ah |
| 13:18:03 | raptor | that link above shows some fancy graphics that show that |
| 13:19:47 | kaen | ohhh |
| 13:19:58 | kaen | yep, I definitely misunderstood |
| 13:20:13 | raptor | so i did the work to go to GL ES 1.1 for that iOS port |
| 13:20:18 | kaen | It sounds like we'll need to change all of the glMatrix and glColor stuff too |
| 13:20:29 | raptor | which ended up being good for performance; and we were still GL 1.0 compatible |
| 13:20:38 | kaen | scale/rotate/translate |
| 13:20:41 | raptor | eek |
| 13:20:44 | kaen | we could add shims |
| 13:20:46 | raptor | that could get hairy fast |
| 13:20:47 | raptor | yes |
| 13:20:48 | kaen | with the same names |
| 13:20:51 | raptor | i agree |
| 13:20:55 | kaen | that modify a BF matrix stack |
| 13:21:02 | kaen | in fact, there's no way I'm the first person to have this idea |
| 13:21:04 | kaen | oh! |
| 13:21:11 | kaen | didn't someone use that to port BF to pandora? |
| 13:21:12 | raptor | now i remember some library that did something like that... EGL, i think? |
| 13:21:25 | kaen | I'm sure this already exists |
| 13:21:53 | raptor | http://repo.openpandora.org/?page=detail&app=bitfighter |
| 13:22:08 | raptor | the GL ES 1.1 work was what allowed the pandora port, too |
| 13:22:27 | raptor | so basically, our base codebase is GL ES 1.1 compatible |
| 17:00:56 | | fordcars has joined |
| 17:47:54 | raptor | looks like we need to still have normal OpenGL 1+ for desktop... Apple and Microsoft don't really do GLES 2 |
| 17:48:06 | raptor | err... for their desktop OSes |
| 17:48:12 | raptor | iOS requires GLES2 |
| 17:48:33 | kaen | yeah, I was reading and it sounds like we should use a flag |
| 17:48:59 | kaen | I still need to play around a bit to figure out a good path to adding GLES2 support |
| 17:49:04 | raptor | and linux does everything! those Mesa folks do it all |
| 17:49:18 | kaen | I think we'll finally need that abstracted rendering layer we've been theorizing about |
| 17:49:35 | raptor | yeah... in fact, i wonder if SDL2 has that already... |
| 17:49:54 | raptor | i see code for setting up GL vs GLES contexts |
| 17:50:06 | raptor | meeting... back soon |
| 17:50:13 | kaen | have fun! |
| 18:14:56 | | amgine123 has joined |
| 18:16:07 | amgine123 | hey raptor anything new ? |
| 18:51:50 | fordcars | kaen: does Bitfighter have some kind of 2d point class? |
| 18:57:05 | raptor | fordcars: Point.cpp |
| 18:57:14 | raptor | hi |
| 18:57:18 | fordcars | Ah thanks |
| 18:57:27 | fordcars | That was stupidly obvious |
| 19:05:26 | raptor | amgine123: nothing new - but we're scheming to break a lot of things soon :) |
| 19:22:09 | amgine123 | dont break bitfighter Xd |
| 19:22:33 | amgine123 | al;though im sure you have done that before accidently gotten a build of bitfighter so badly broken it was beyond repair and you had to revert to a odler version :) |
| 19:22:46 | amgine123 | right ? XD |
| 19:23:30 | raptor | yep |
| 19:29:37 | raptor | heading home! |
| 19:29:39 | | raptor Quit () |
| 19:44:34 | | Invisible has joined |
| 20:01:30 | | Invisible Quit (Ping timeout: 265 seconds) |
| 20:02:35 | | amgine123 Quit (Ping timeout: 246 seconds) |
| 22:19:12 | | Invisible has joined |
| 22:37:59 | | fordcars Quit (Ping timeout: 246 seconds) |
| 22:58:58 | | fordcars has joined |
| 23:29:19 | | fordcars Quit (Quit: Page closed) |
| 23:29:19 | | Darrel Quit (Read error: Connection reset by peer) |
| 23:29:38 | | Darrel has joined |
| 23:56:27 | | Invisible1 has joined |
| 23:56:53 | | Invisible Quit (Ping timeout: 240 seconds) |
| 23:58:26 | | fordcars has joined |