#bitfighter IRC Log

Index Search ←Prev date Next date→

IRC Log for 2015-01-19

Timestamps are in GMT/BST.

03:22:41Quartzy has joined
03:39:03Quartzy Quit (Quit: Page closed)
06:12:18LordDVG has joined
06:56:35LordDVG Quit (Remote host closed the connection)
11:59:49raptor has joined
11:59:49ChanServ sets mode +o
11:59:59raptorgood day!
12:28:19kaengood day!
12:28:41kaenI put up a couple of new levels: http://bitfighter.org/levels/
12:28:52raptori'm sorry i was gone yesterday - I think Sundays are going to be a bit busier for my family from now on...
12:28:59raptoroooo
12:29:01kaenno worries at all
12:29:09kaenI mostly just fooled around this weekend
12:29:10kaenoh!
12:29:17kaenI fixed the worldToScreen helper in the shader
12:29:32kaenso it works at any scalefactor
12:29:34raptoroh? what code pathway did you use?
12:30:02kaenreturn 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:22kaenessentially, just put the world coords through the GL matrix pipeline
12:30:27raptorha
12:30:36raptorwait, what is 'screen' in this instance?
12:30:44kaenthe screen size in physical pixels
12:31:15kaenGL pipeline maps on the range -1.0, 1.0
12:31:21raptorahh, ok
12:31:26kaenso you have to scale it by the screen size to get physical pixels
12:31:43kaenand, I can write an inverse function
12:31:46kaenscreenToWorld
12:31:57kaenlets use world distances in shader logic :)
12:32:02kaenlets us use*
12:32:46kaenrather than pixel distances, which would prevent the effects from scaling with the canvas
12:32:56raptorah ha
12:32:59raptorso question -
12:33:40raptordo 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:50raptori know that the processing is offloaded to the GPU, but would the pre-processing negate the CPU performance gains?
12:35:47kaenpossibly, 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:58kaenI haven't added any CPU-preprocessing that I'm aware of though
12:38:46kaenI 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:28raptoryeah, that's negligible
12:40:14kaenI'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:33raptorit's probably not a real concern - I think GLES 2 compatibility would, by itself, be a great thing
12:42:21raptor'flourish' looks nice
12:42:47raptorthe level screenshots don't look antialiased...
12:43:49kaenhmm, I might have disabled that
12:46:53kaenhmm, can't seem to turn it on
12:47:00kaenI know it's working in other games
12:47:06kaenoh
12:47:16kaenwe just use gl smoothing right?
12:47:39kaeniirc that's not implemented for my drivers. Shader FSAA works though :P
12:48:34kaenso for the shader stuff
12:48:39kaenI think it's best for me to just maintain a clone
12:48:40raptorha!
12:48:45raptoryeah line smoothing
12:49:03kaenuntil 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:20raptornow for GLES 2 compatibility -
12:49:25kaenah yes
12:49:39kaendon't we have some/all of that in the iOS clone?
12:49:43raptorwill that pretty much involve moving all the gl calls from gameobjectrender.cpp into shader frags/etc.
12:49:53kaenoh
12:50:10raptorno, the iOS clone sparked GLES 1 compatibility
12:50:13kaenahh
12:50:18kaenI apparently have some reading to do
12:50:19raptori made very little overall changes
12:50:23kaennot at all familiar with GLES 2
12:50:43raptorthat is the main goal, in my opinion, of using the shader framework
12:50:56kaenbut, it sounds like you have to bind your vertex arrays to attributes manually
12:50:59raptoror at least the next main goal...
12:51:00kaenwhich is actually trivial
12:51:10kaenbut probably tedious
12:51:36raptoryeah - i don't mind the tedium, but i need to understand the whole shader architecture a little bit better
12:51:50kaenI need to understand the requirements of GLES2 better, as well
12:52:29raptorhere: https://wiki.maemo.org/OpenGL-ES
12:52:38raptorthat is where i started to go from GL -> GLES 1.1
12:55:07kaenfound 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:14kaendo you know if that is true?
12:55:37kaenI was thinking we'd have an OGL rendering system and a GLES 2 rendering system
12:55:42kaenswitched at compile time
12:56:02kaenbut if we can avoid that, we're actually ready for GLES 2 right now
12:56:28kaensounds like the "hardest" part is wiring up replacements for the default pipeline, which has been in my shader clone since rev 1
12:57:31kaenall 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:00kaenhuh
12:58:26kaenso yeah, we might actually come out with cpu savings when no fancy shaders are enabled
12:59:08kaenjust based uploading vert data in batches to the gpu
13:00:56kaenman I want to hack on the shader stuff so bad right now
13:01:19kaenbut I have to deploy 103 more tomcat webapps today :<
13:16:38raptorthat is not true
13:16:46raptoroh wait
13:16:58raptorif we code to GLES we can run on desktop <-- that is true
13:17:04raptorbut not the otherway around
13:17:09kaensure, that makes sense
13:17:29kaenI wonder which OGL version added the stuff GLES 2 uses
13:17:36raptorso right now we use GL 1.0... maximumly compatible
13:17:43raptorif that's a word...
13:17:48kaeni.e. what the minimum OGL version is that would support GLES 2 stuff
13:17:50raptorGL 2 addes the GLES stuff
13:17:53kaenah
13:18:03raptorthat link above shows some fancy graphics that show that
13:19:47kaenohhh
13:19:58kaenyep, I definitely misunderstood
13:20:13raptorso i did the work to go to GL ES 1.1 for that iOS port
13:20:18kaenIt sounds like we'll need to change all of the glMatrix and glColor stuff too
13:20:29raptorwhich ended up being good for performance; and we were still GL 1.0 compatible
13:20:38kaenscale/rotate/translate
13:20:41raptoreek
13:20:44kaenwe could add shims
13:20:46raptorthat could get hairy fast
13:20:47raptoryes
13:20:48kaenwith the same names
13:20:51raptori agree
13:20:55kaenthat modify a BF matrix stack
13:21:02kaenin fact, there's no way I'm the first person to have this idea
13:21:04kaenoh!
13:21:11kaendidn't someone use that to port BF to pandora?
13:21:12raptornow i remember some library that did something like that... EGL, i think?
13:21:25kaenI'm sure this already exists
13:21:53raptorhttp://repo.openpandora.org/?page=detail&app=bitfighter
13:22:08raptorthe GL ES 1.1 work was what allowed the pandora port, too
13:22:27raptorso basically, our base codebase is GL ES 1.1 compatible
17:00:56fordcars has joined
17:47:54raptorlooks like we need to still have normal OpenGL 1+ for desktop... Apple and Microsoft don't really do GLES 2
17:48:06raptorerr... for their desktop OSes
17:48:12raptoriOS requires GLES2
17:48:33kaenyeah, I was reading and it sounds like we should use a flag
17:48:59kaenI still need to play around a bit to figure out a good path to adding GLES2 support
17:49:04raptorand linux does everything! those Mesa folks do it all
17:49:18kaenI think we'll finally need that abstracted rendering layer we've been theorizing about
17:49:35raptoryeah... in fact, i wonder if SDL2 has that already...
17:49:54raptori see code for setting up GL vs GLES contexts
17:50:06raptormeeting... back soon
17:50:13kaenhave fun!
18:14:56amgine123 has joined
18:16:07amgine123hey raptor anything new ?
18:51:50fordcarskaen: does Bitfighter have some kind of 2d point class?
18:57:05raptorfordcars: Point.cpp
18:57:14raptorhi
18:57:18fordcarsAh thanks
18:57:27fordcarsThat was stupidly obvious
19:05:26raptoramgine123: nothing new - but we're scheming to break a lot of things soon :)
19:22:09amgine123dont break bitfighter Xd
19:22:33amgine123al;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:46amgine123right ? XD
19:23:30raptoryep
19:29:37raptorheading home!
19:29:39raptor Quit ()
19:44:34Invisible has joined
20:01:30Invisible Quit (Ping timeout: 265 seconds)
20:02:35amgine123 Quit (Ping timeout: 246 seconds)
22:19:12Invisible has joined
22:37:59fordcars Quit (Ping timeout: 246 seconds)
22:58:58fordcars has joined
23:29:19fordcars Quit (Quit: Page closed)
23:29:19Darrel Quit (Read error: Connection reset by peer)
23:29:38Darrel has joined
23:56:27Invisible1 has joined
23:56:53Invisible Quit (Ping timeout: 240 seconds)
23:58:26fordcars has joined

Index Search ←Prev date Next date→

These logs were automatically created by BFLogBot on irc.freenode.net.