Switch to DuckDuckGo Search
   November 7, 2014  
< | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | >

Toggle Join/Part | bottom
[00:00:43] *** BitPuffin has quit IRC
[00:01:24] *** BitPuffin has joined ##OpenGL
[00:01:46] *** SurgeMedic has quit IRC
[00:03:21] *** phr34k has quit IRC
[00:04:40] *** shintah has quit IRC
[00:05:54] *** mat^2 has quit IRC
[00:07:02] *** HOS_cr`nge has quit IRC
[00:09:20] *** jdolan has joined ##OpenGL
[00:10:13] *** Folkol has quit IRC
[00:13:23] *** YarnFive8 has joined ##OpenGL
[00:14:08] *** theripper93 has joined ##OpenGL
[00:15:54] <theripper93> Hi, I'm trying to draw an triangle using opengl 3+ with SDL as context. I followed an tutorial and done everything right, but my screen is just black. Anyone can help me find the mistake? I just can't figure it out! Here is the code http://pastebin.com/fTHuubM1
[00:16:13] *** Shogun has quit IRC
[00:16:36] *** armadillu has joined ##OpenGL
[00:16:46] *** armadillu has quit IRC
[00:17:03] *** armadillu has joined ##OpenGL
[00:17:56] <derhass> theripper93: you must use shaders in core profile
[00:18:25] *** armadillu has quit IRC
[00:19:29] *** anivemin has joined ##OpenGL
[00:19:39] *** metredigm has left ##OpenGL
[00:20:08] *** pizthewiz has joined ##OpenGL
[00:20:10] <theripper93> thank you derhass, I'm just a bit lost. Everything I done was on the legacy opengl. I'll search about that.
[00:20:39] <derhass> what tutorial do you use?
[00:20:55] *** puerum has joined ##OpenGL
[00:21:05] <theripper93> derhass, http://www.opengl-tutorial.org/beginners-tutorials/tutorial-2-the-first-triangle/ this one.
[00:21:08] *** HOS_cr`nge has joined ##OpenGL
[00:21:49] <derhass> theripper93: to quote from that page "If you’re on lucky, you can see the result (don’t panic if you don’t)"
[00:22:27] <derhass> actually, lucky means "a sloppy gl implementation not caring too much about the spec"
[00:22:38] <derhass> you shouldn't see anything at this point
[00:23:14] <theripper93> lol yeah, makes sense.
[00:23:14] *** Ryp has joined ##OpenGL
[00:23:46] <theripper93> I'll keep following the tutorial, see if can do it right.
[00:23:56] <theripper93> thank you for the help
[00:24:12] *** anivemin has quit IRC
[00:24:57] *** japro has joined ##OpenGL
[00:25:07] *** Shogun has joined ##OpenGL
[00:27:29] *** Misu has quit IRC
[00:27:55] *** SurgeMedic has joined ##OpenGL
[00:28:17] *** _leb has quit IRC
[00:35:56] *** pabb has joined ##OpenGL
[00:41:55] *** snakenerd has joined ##OpenGL
[00:43:41] *** snakenerd has quit IRC
[00:44:35] *** staylor has quit IRC
[00:49:43] *** b4b has joined ##OpenGL
[00:53:58] *** ShadowIce has quit IRC
[00:55:05] *** hexagoxel has quit IRC
[01:02:27] *** krnlyng has quit IRC
[01:03:20] *** krnlyng has joined ##OpenGL
[01:13:59] *** Rutix has quit IRC
[01:18:59] *** TheTeapot has joined ##OpenGL
[01:20:49] *** SurgeMedic has quit IRC
[01:25:49] <Dom_> why does auto make suck so much dick?
[01:27:01] *** Khlorghaal has joined ##OpenGL
[01:28:20] <foobaz> i blame RMS
[01:28:36] *** derhass has quit IRC
[01:28:38] <foobaz> but yea it's fucking terrible
[01:31:17] *** TheTeapot has quit IRC
[01:32:29] *** Keniyal has quit IRC
[01:37:20] *** lenarhoyt has joined ##OpenGL
[01:37:23] *** kuldeepdhaka has joined ##OpenGL
[01:37:44] *** seaworthy has quit IRC
[01:38:13] *** lenarhoyt has quit IRC
[01:38:28] *** lenarhoyt has joined ##OpenGL
[01:38:44] *** seaworthy has joined ##OpenGL
[01:40:25] *** lenarhoyt has quit IRC
[01:40:42] *** lenarhoyt has joined ##OpenGL
[01:44:18] *** Ryp has quit IRC
[01:44:59] *** TheTeapot has joined ##OpenGL
[01:47:22] *** doomlord_1 has quit IRC
[01:48:29] *** prophile has quit IRC
[01:49:16] *** razieliyo_ has quit IRC
[01:53:26] <Dom_> should i put make files in every sub dir and link against the objects or should i just compile against the sources?
[01:55:15] <HuntsMan> not a GL question :D
[01:55:19] <HuntsMan> but hint: use cmake
[01:58:09] *** lenarhoyt has quit IRC
[01:58:26] *** lenarhoyt has joined ##OpenGL
[02:00:21] *** Orion] has quit IRC
[02:00:43] *** BitPuffin has quit IRC
[02:02:11] *** Ryp has joined ##OpenGL
[02:04:50] *** phr34k has joined ##OpenGL
[02:06:52] *** konom has quit IRC
[02:08:32] *** anivemin has joined ##OpenGL
[02:08:53] *** Viata has joined ##OpenGL
[02:10:41] *** charlie5 has joined ##OpenGL
[02:11:56] *** _leb has joined ##OpenGL
[02:13:43] *** anivemin has quit IRC
[02:16:34] *** Twinklebear has joined ##OpenGL
[02:31:01] *** Madsy has quit IRC
[02:31:05] *** positronic has joined ##OpenGL
[02:32:01] *** phr34k has quit IRC
[02:34:00] *** paul424 has quit IRC
[02:36:21] *** TheTeapot has quit IRC
[02:36:53] *** Ivorius has quit IRC
[02:40:02] *** Ivorius has joined ##OpenGL
[02:41:44] *** konom has joined ##OpenGL
[02:42:02] *** Madsy has joined ##OpenGL
[02:42:02] *** Madsy has joined ##OpenGL
[02:50:54] *** hahuang65 has quit IRC
[02:54:41] *** Crehl has quit IRC
[02:56:57] *** kalzz has quit IRC
[03:00:43] *** slime has quit IRC
[03:02:23] *** slime has joined ##OpenGL
[03:03:11] *** Garner has quit IRC
[03:03:14] *** mukunda_ has quit IRC
[03:03:43] *** mukunda_ has joined ##OpenGL
[03:05:13] *** SleekoNiko has joined ##OpenGL
[03:07:17] *** kalzz has joined ##OpenGL
[03:08:36] *** mukunda_ has quit IRC
[03:08:59] *** Dark_Confidant|m has joined ##OpenGL
[03:08:59] *** Dark_Confidant has quit IRC
[03:13:59] *** Lucretia has quit IRC
[03:14:28] *** Lucretia has joined ##OpenGL
[03:17:04] *** mukunda_ has joined ##OpenGL
[03:18:29] *** Ryp has quit IRC
[03:33:58] *** metredigm has joined ##OpenGL
[03:36:28] *** devbug has joined ##OpenGL
[03:39:40] *** Viata has quit IRC
[03:41:07] *** TunnelCat has quit IRC
[03:48:28] *** Hunts has joined ##OpenGL
[03:48:29] *** b4b has quit IRC
[03:52:23] *** HuntsMan has quit IRC
[03:53:47] *** hdon has joined ##OpenGL
[03:54:54] *** jdolan has quit IRC
[03:55:32] *** glYoda has quit IRC
[03:55:43] *** glYoda has joined ##OpenGL
[03:57:19] *** anivemin has joined ##OpenGL
[03:58:30] *** jdolan has joined ##OpenGL
[03:59:35] *** confusa-est has joined ##OpenGL
[03:59:57] *** confusa-est has quit IRC
[04:01:53] *** anivemin has quit IRC
[04:04:22] *** b4b has joined ##OpenGL
[04:27:15] *** theripper93 has quit IRC
[04:27:24] *** konom has quit IRC
[04:30:21] *** Plasmastar has quit IRC
[04:30:48] *** centrinia has quit IRC
[04:32:39] *** b4b has quit IRC
[04:33:04] *** MLM has quit IRC
[04:34:12] *** Plasmastar has joined ##OpenGL
[04:36:53] *** b4b has joined ##OpenGL
[04:37:35] *** metredigm has quit IRC
[04:39:19] *** bb010g_ is now known as bb010g
[04:43:40] *** meoblast001 has joined ##OpenGL
[04:46:21] *** slidercrank has quit IRC
[04:47:19] *** Cabanossi has quit IRC
[04:49:29] *** Cabanossi has joined ##OpenGL
[04:52:11] *** shingshang has joined ##OpenGL
[04:55:42] *** urraka has quit IRC
[04:56:04] *** lenarhoyt has quit IRC
[04:56:34] *** samrat has joined ##OpenGL
[04:57:16] *** BitPuffin has joined ##OpenGL
[04:58:35] *** TheTeapot has joined ##OpenGL
[05:01:23] *** BitPuffin has quit IRC
[05:02:33] *** rcny has joined ##OpenGL
[05:03:37] *** Ad1_RN has quit IRC
[05:03:48] *** b4b has quit IRC
[05:04:27] *** qeed has quit IRC
[05:11:25] *** Ad1_RN has joined ##OpenGL
[05:13:59] *** TheTeapot has quit IRC
[05:15:54] *** jdolan has quit IRC
[05:16:18] *** jdolan has joined ##OpenGL
[05:19:13] *** samrat has quit IRC
[05:21:15] *** pizthewiz has quit IRC
[05:21:28] *** Textmode has joined ##OpenGL
[05:26:19] *** jdolan has quit IRC
[05:31:52] *** wiky has joined ##OpenGL
[05:35:50] *** ra4king has quit IRC
[05:36:01] *** ra4king has joined ##OpenGL
[05:43:04] *** roboman2444 has quit IRC
[05:46:02] *** anivemin has joined ##OpenGL
[05:50:23] *** anivemin has quit IRC
[05:50:57] *** seaworthy has quit IRC
[05:57:38] *** BreadProduct_ has joined ##OpenGL
[06:01:21] *** BreadProduct has quit IRC
[06:01:27] *** BreadProduct_ is now known as BreadProduct
[06:02:10] *** centrinia has joined ##OpenGL
[06:07:40] *** rcny has quit IRC
[06:10:32] *** tcsc has quit IRC
[06:20:25] *** Gamecubic has quit IRC
[06:27:24] *** meoblast001 has quit IRC
[06:28:24] *** damir__ has joined ##OpenGL
[06:29:10] *** seaworthy has joined ##OpenGL
[06:30:52] *** shintah has joined ##OpenGL
[06:32:35] *** samrat has joined ##OpenGL
[06:32:53] *** damir__ has quit IRC
[06:43:22] *** Rutix has joined ##OpenGL
[06:43:23] *** Rutix has joined ##OpenGL
[06:47:09] *** Shogun_ has joined ##OpenGL
[06:49:51] *** Shogun has quit IRC
[07:02:12] *** phr34k has joined ##OpenGL
[07:04:01] *** bjz has joined ##OpenGL
[07:04:40] *** samrat has quit IRC
[07:07:55] *** HOS_cr`nge has quit IRC
[07:11:07] *** foreignFunction has joined ##OpenGL
[07:11:18] *** samrat has joined ##OpenGL
[07:18:35] *** HunterD has joined ##OpenGL
[07:19:27] *** ``Erik_ has joined ##OpenGL
[07:21:10] *** ``Erik has quit IRC
[07:21:48] *** HOS_cr`nge has joined ##OpenGL
[07:21:49] *** HunterD has quit IRC
[07:30:57] *** phr34k has quit IRC
[07:31:06] *** samrat has quit IRC
[07:31:06] *** SleekoNiko has quit IRC
[07:32:15] *** samrat has joined ##OpenGL
[07:34:54] *** anivemin has joined ##OpenGL
[07:36:33] *** samrat has quit IRC
[07:39:16] *** samrat has joined ##OpenGL
[07:39:18] *** foreignFunction has quit IRC
[07:39:45] *** anivemin has quit IRC
[07:39:59] *** Ad1_RnR has joined ##OpenGL
[07:41:40] *** telex has quit IRC
[07:42:45] *** telex has joined ##OpenGL
[07:45:15] *** seaworthy has quit IRC
[07:47:54] *** Ad1_RnR has quit IRC
[07:48:08] *** Shogun_ is now known as Shogun
[07:57:31] *** samrat has quit IRC
[08:00:30] *** pabb has quit IRC
[08:14:01] *** zajfy has quit IRC
[08:15:05] *** zoraj has joined ##OpenGL
[08:17:58] *** samrat has joined ##OpenGL
[08:18:30] *** centrinia has quit IRC
[08:18:49] *** clauswitt has joined ##OpenGL
[08:20:05] *** Twinklebear has quit IRC
[08:23:37] *** HOS_cr`nge has quit IRC
[08:24:23] *** samrat has quit IRC
[08:26:52] *** jdolan has joined ##OpenGL
[08:28:28] *** samrat has joined ##OpenGL
[08:28:34] *** Demon_Fox has joined ##OpenGL
[08:29:57] *** Burga has joined ##OpenGL
[08:31:33] *** Lemml has joined ##OpenGL
[08:31:43] *** jdolan has quit IRC
[08:32:59] *** samrat has quit IRC
[08:33:23] *** Garner has joined ##OpenGL
[08:33:36] *** centrinia has joined ##OpenGL
[08:38:18] *** Beetny has joined ##OpenGL
[08:38:36] *** TyrfingMjolnir has joined ##OpenGL
[08:38:58] *** samrat has joined ##OpenGL
[08:40:04] *** groton has joined ##OpenGL
[08:42:29] *** Burga has quit IRC
[08:47:55] *** damir__ has joined ##OpenGL
[08:50:47] *** Chunk2 has quit IRC
[08:51:42] *** roboman2444 has joined ##OpenGL
[08:55:59] *** CainJacobi has quit IRC
[08:56:17] *** groton has quit IRC
[09:06:59] *** Chunk2 has joined ##OpenGL
[09:08:17] *** FrodoTheHobbit has quit IRC
[09:08:29] *** FrodoTheHobbit has joined ##OpenGL
[09:15:24] *** PasNox has joined ##OpenGL
[09:17:54] *** Burga has joined ##OpenGL
[09:18:30] *** _leb has quit IRC
[09:20:33] *** anivemin has joined ##OpenGL
[09:25:15] *** robot-beethoven has joined ##OpenGL
[09:25:41] *** anivemin has quit IRC
[09:26:22] *** centrinia has quit IRC
[09:26:24] *** Zupo has quit IRC
[09:30:21] *** TyrfingMjolnir has quit IRC
[09:33:20] *** Burga has quit IRC
[09:40:12] *** karab44 has joined ##OpenGL
[09:43:46] *** BreadProduct has quit IRC
[09:51:54] *** Khlorghaal has quit IRC
[10:01:56] *** hexagoxel has joined ##OpenGL
[10:02:11] *** pazul has joined ##OpenGL
[10:02:49] *** groton has joined ##OpenGL
[10:03:44] *** devbug has quit IRC
[10:06:55] *** puerum has quit IRC
[10:13:22] *** PasNox has quit IRC
[10:13:33] *** PasNox_ has joined ##OpenGL
[10:14:22] *** Tag_ has joined ##OpenGL
[10:14:31] <Tag_> good morning
[10:16:28] *** redeemed has joined ##OpenGL
[10:19:18] *** snakenerd has joined ##OpenGL
[10:19:55] *** ChrisUK has quit IRC
[10:22:51] *** Burga has joined ##OpenGL
[10:26:05] *** snakenerd has quit IRC
[10:28:56] *** mat^2 has joined ##OpenGL
[10:37:12] *** prophile has joined ##OpenGL
[10:37:54] *** viggo2 has joined ##OpenGL
[10:38:51] *** anivemin has joined ##OpenGL
[10:40:05] *** viggo has quit IRC
[10:41:53] *** zoraj has quit IRC
[10:41:58] *** Dark_Confidant|m has quit IRC
[10:42:26] *** Dark_Confidant has joined ##OpenGL
[10:44:24] *** carvite has quit IRC
[10:46:45] *** Waynes has joined ##OpenGL
[10:49:09] *** carvite has joined ##OpenGL
[10:49:46] *** antonp has joined ##OpenGL
[10:51:25] *** Textmode has quit IRC
[10:54:31] *** doev has joined ##OpenGL
[10:56:32] *** glYoda has quit IRC
[11:04:10] *** Demon_Fox has quit IRC
[11:04:49] *** Burga has quit IRC
[11:10:11] *** bjz has quit IRC
[11:10:27] *** bjz has joined ##OpenGL
[11:13:49] *** centrinia has joined ##OpenGL
[11:32:02] *** Crehl has joined ##OpenGL
[11:32:47] *** antonp has quit IRC
[11:33:43] <AbiBuccaneer> morning Tag_
[11:36:29] *** hexagoxel has quit IRC
[11:41:30] *** Tag_ has quit IRC
[11:42:41] *** groton has quit IRC
[11:44:47] *** sam_ is now known as sam
[11:49:18] *** wiky has quit IRC
[11:53:29] *** Ryp1 has joined ##OpenGL
[12:00:34] *** doev has quit IRC
[12:00:48] *** aethersis has joined ##OpenGL
[12:00:55] *** aethersis is now known as dreamminder
[12:01:18] *** antonp has joined ##OpenGL
[12:01:27] *** clauswitt has quit IRC
[12:03:05] *** groton has joined ##OpenGL
[12:10:58] *** Keniyal has joined ##OpenGL
[12:13:20] *** robot-beethoven has quit IRC
[12:14:27] *** TyrfingMjolnir has joined ##OpenGL
[12:22:38] *** hexagoxel has joined ##OpenGL
[12:23:08] *** Crehl has quit IRC
[12:23:26] *** slidercrank has joined ##OpenGL
[12:31:03] *** HOS_cr`nge has joined ##OpenGL
[12:31:42] *** Ryp1 has quit IRC
[12:32:06] *** clauswitt has joined ##OpenGL
[12:36:48] *** BitPuffin has joined ##OpenGL
[12:37:18] *** Sos has quit IRC
[12:37:41] *** snakenerd has joined ##OpenGL
[12:38:09] *** adsc has joined ##OpenGL
[12:38:34] *** Ryp has joined ##OpenGL
[12:42:26] *** xishem has joined ##OpenGL
[12:44:27] *** centrinia has quit IRC
[12:45:29] *** xishe has quit IRC
[12:48:41] *** paperManu_ has joined ##OpenGL
[12:55:31] *** erhan_ has joined ##OpenGL
[12:58:12] *** razieliyo has joined ##OpenGL
[12:58:53] *** zoraj has joined ##OpenGL
[12:59:24] *** Folkol has joined ##OpenGL
[13:00:36] *** samrat has quit IRC
[13:08:44] *** viggo2 is now known as viggo
[13:09:05] *** jdolan has joined ##OpenGL
[13:11:36] *** clauswitt has quit IRC
[13:12:15] *** clauswitt has joined ##OpenGL
[13:14:18] *** jdolan has quit IRC
[13:14:39] *** jdolan has joined ##OpenGL
[13:16:58] *** Shogun has quit IRC
[13:21:18] *** Jack_ has joined ##OpenGL
[13:26:54] *** clauswit_ has joined ##OpenGL
[13:27:06] *** pabb has joined ##OpenGL
[13:27:39] *** Viata has joined ##OpenGL
[13:30:17] *** clauswitt has quit IRC
[13:30:23] *** Beetny has quit IRC
[13:31:45] *** clauswit_ has quit IRC
[13:32:04] *** paperManu_ has quit IRC
[13:32:19] *** clauswitt has joined ##OpenGL
[13:34:15] *** hexagoxel has quit IRC
[13:39:38] *** zzuegg has quit IRC
[13:40:47] *** CrizMobius has joined ##OpenGL
[13:43:42] *** Jack__ has joined ##OpenGL
[13:44:33] *** Jack_ has quit IRC
[13:46:49] *** Gamecubic has joined ##OpenGL
[13:47:34] *** antonp has quit IRC
[13:49:03] *** Jack_ has joined ##OpenGL
[13:49:42] *** Jack__ has quit IRC
[13:50:13] *** ClarusCogitatio has quit IRC
[13:52:49] *** ClarusCogitatio has joined ##OpenGL
[13:53:22] *** groton has quit IRC
[13:53:44] <krnlyng> hi, probably a stupid question, i am drawing octangles to the screen, the vertices are calculated like this: https://bpaste.net/show/7561a0d3a940 but there is one issue: the octangles are in egg like shape whereas they should be ball like shaped, do i need to include the DPI into my calculation? or the aspect ratio? i've tried including the aspect ratio but they still are a bit squished
[13:54:46] <AbiBuccaneer> octangles! hah
[13:54:50] <AbiBuccaneer> good word
[13:55:42] *** SHLV has joined ##OpenGL
[13:56:16] <AbiBuccaneer> krnlyng, the output from vertex processing - 'normalized device coordinates' - range from -1 to 1 in x y and z. So if you're drawing your vertices in screenspace, then you do need to take into account the aspect ratio of your screen.
[13:56:57] <AbiBuccaneer> it's more usual to use a projection matrix which takes into account your screen dimensions
[13:57:18] <AbiBuccaneer> and then you can assume that your coordinate space is orthonormal
[13:57:25] <krnlyng> ah i see
[13:57:35] <krnlyng> thanks :)
[13:57:41] *** wutata- has joined ##OpenGL
[13:57:42] <krnlyng> any good tutorials on projection matrices?
[13:57:54] <wutata-> krnlyng, have you checked NeHe?
[13:57:57] *** Viata has quit IRC
[13:58:08] <Hunts> come on, don't recommend NeHe
[13:58:16] <wutata-> oh?
[13:58:25] <wutata-> how so?
[13:58:31] <Hunts> it uses ancient GL
[13:58:34] <Hunts> and it is full of bugs
[13:58:38] <wutata-> oh yeah, that's true
[13:58:59] <AbiBuccaneer> krnlyng, http://arcsynthesis.org/gltut/Positioning/Tut04%20Perspective%20Projection.html
[13:59:08] <krnlyng> AbiBuccaneer: thanks
[13:59:12] <AbiBuccaneer> this is predominantly about perspective projections - which are used in 3D drawing
[13:59:33] <AbiBuccaneer> but if you're doing 2D stuff then you'll only want an orthographic (but not an orthonormal) projection
[14:01:57] <wutata-> lighthouse3d also has some general banter about matrices
[14:02:14] <AbiBuccaneer> krnlyng, https://open.gl/drawing#Vertexinput https://open.gl/transformations#TransformationsinOpenGL
[14:02:37] <wutata-> I don't think that's what you're looking for, krnlyng, but here's the link: http://www.lighthouse3d.com/tutorials/glsl-core-tutorial/glsl-core-tutorial-spaces-and-matrices/
[14:03:02] <wutata-> oh
[14:03:04] <wutata-> also hi people
[14:03:21] <wutata-> I didn't know there really was a GL channel, I just hopped in blind
[14:03:48] *** wutata- is now known as wutata
[14:07:07] *** BitPuffin has quit IRC
[14:07:45] <AbiBuccaneer> wutata, i assumed you were new from the way that you joined and then immediately recommended NeHe ;)
[14:07:57] <wutata> bahaha
[14:08:14] <wutata> I haven't used much resources since the dawn of time I learned through NeHe
[14:08:35] <wutata> I kinda kept on the belief it was still the stuff today
[14:09:23] *** HOS_cr`nge has quit IRC
[14:10:20] <Hunts> wutata: it was not really the best stuff for its day
[14:10:40] <wutata> eh, I guess
[14:11:25] *** groton has joined ##OpenGL
[14:11:30] <wutata> arcsynthesis is the new source?
[14:12:14] <wutata> well 'new'
[14:13:14] *** samrat has joined ##OpenGL
[14:13:18] <AbiBuccaneer> arcsynthesis is a lot more rigorous
[14:13:38] <AbiBuccaneer> NeHe was very much written in the spirit of "i've figured out how to do some opengl stuff and i'm gonna teach you kids too"
[14:13:44] *** tomnewmann has joined ##OpenGL
[14:14:05] <AbiBuccaneer> which is fine for some purposes, but not a very large and constantly-evolving library that's also typically learned at the same time as an entire mathematical field (linear algebra)
[14:15:03] <wutata> hmh, it appears I'll be giving it a good look-around
[14:19:52] *** tomnewmann has quit IRC
[14:20:19] *** tomnewmann has joined ##OpenGL
[14:30:18] *** xissburg has joined ##OpenGL
[14:30:22] *** tomnewmann has quit IRC
[14:30:54] *** tomnewmann has joined ##OpenGL
[14:32:17] *** Majiet has quit IRC
[14:34:26] *** Ryp has quit IRC
[14:35:01] *** Ryp has joined ##OpenGL
[14:35:22] *** Majiet has joined ##OpenGL
[14:35:38] *** jdolan has quit IRC
[14:37:33] *** kuldeepdhaka has quit IRC
[14:40:04] *** hexagoxel has joined ##OpenGL
[14:40:18] *** antonp has joined ##OpenGL
[14:41:25] *** urraka has joined ##OpenGL
[14:41:37] *** tomnewmann has quit IRC
[14:43:03] *** tomnewmann has joined ##OpenGL
[14:44:35] *** tomnewmann has quit IRC
[14:44:48] *** tomnewmann has joined ##OpenGL
[14:45:11] *** tomnewmann has quit IRC
[14:45:35] *** tomnewmann has joined ##OpenGL
[14:48:27] *** tomnewmann has quit IRC
[14:48:46] *** tomnewmann has joined ##OpenGL
[14:49:32] *** tehrain has joined ##OpenGL
[14:49:32] *** tehrain has joined ##OpenGL
[14:49:54] *** tomnewmann has quit IRC
[14:52:37] *** vegard1992 has joined ##OpenGL
[14:52:38] <vegard1992> heyeyy
[14:52:47] *** cden has joined ##OpenGL
[14:52:56] <vegard1992> guys
[14:53:03] <vegard1992> i am wanting to do a lot of 2d effects
[14:53:26] *** samrat has quit IRC
[14:53:55] <vegard1992> where i send an image to my shader and manipulate it
[14:55:09] <vegard1992> im using just a vertex fragment right now
[14:55:24] <vegard1992> is there any way i can send image data as a huge array to fragment?
[14:55:32] <vegard1992> and use gl_FragCoord
[14:55:33] <vegard1992> and stuff
[14:56:18] <ClaudiusMaximus> vegard1992: bind it to a texture, send coordinates from vertex shader, fragment shader reads from texture at coordinates
[14:56:55] *** samrat has joined ##OpenGL
[14:57:58] <vegard1992> what if want access to other large arrays in my fragment
[14:58:38] <ClaudiusMaximus> vegard1992: bind them to other texture units - you can have more than one texture source in a shader
[14:58:53] <vegard1992> ok but if i want to check multiple parts
[14:59:03] <vegard1992> of that array in each shader instnace
[14:59:05] <vegard1992> thingy
[14:59:07] <vegard1992> :D
[15:00:34] <ClaudiusMaximus> vegard1992: read this https://open.gl/textures , not sure what you mean by multiple parts
[15:01:19] *** Ryp has quit IRC
[15:01:32] *** konom has joined ##OpenGL
[15:02:55] *** meoblast001 has joined ##OpenGL
[15:03:49] *** Ryp has joined ##OpenGL
[15:07:19] *** antonp has quit IRC
[15:08:12] <AbiBuccaneer> vegard1992, a fragment shader can read from multiple texture coordinates in one invocation
[15:09:16] *** clauswitt has quit IRC
[15:09:40] *** clauswitt has joined ##OpenGL
[15:11:40] *** shintahW has quit IRC
[15:15:22] *** xishe has joined ##OpenGL
[15:16:44] *** Orion] has joined ##OpenGL
[15:17:42] *** xish has joined ##OpenGL
[15:17:53] *** Ryp has quit IRC
[15:18:57] *** xishem has quit IRC
[15:20:00] *** xishe has quit IRC
[15:23:02] <vegard1992> ok
[15:23:13] <vegard1992> theres one more problem
[15:23:22] <vegard1992> since im doing some 2d stuff
[15:23:34] <vegard1992> i wanna be able to blit sprites and draw tiles
[15:23:46] <chrisf> draw textured tris/quads
[15:24:15] <vegard1992> fair enough
[15:24:22] <vegard1992> im new to all this stuff :D
[15:24:26] *** jdolan has joined ##OpenGL
[15:25:06] <chrisf> you have 3d hardware better than any blitter ever was, for doing 2d
[15:25:31] <vegard1992> ok
[15:25:41] <vegard1992> so when i call surface.blit in pygame (SDL wrapper)
[15:26:01] <vegard1992> it is using outdated blit stuff?
[15:26:05] *** prophile has quit IRC
[15:27:24] *** shintahW has joined ##OpenGL
[15:28:45] *** pazul has quit IRC
[15:28:48] <AbiBuccaneer> vegard1992, if it wraps SDL, it might be using hardware-accelerated stuff under the hood
[15:29:04] <vegard1992> ok
[15:29:10] <AbiBuccaneer> but if you're already using OpenGL, it's better to just forget all about SDL's drawing functions
[15:29:16] <vegard1992> ya
[15:29:23] <vegard1992> thats fine
[15:29:42] <vegard1992> i want 2 make a scary game xd
[15:29:44] <vegard1992> '-'
[15:30:00] <AbiBuccaneer> vegard1992, make it a text-based game, supply some creepy music, done. no need for opengl
[15:30:03] <chrisf> i dont know if pygame has gone to SDL2... but it used to be all done in software
[15:30:04] <vegard1992> i got 3d sound working last night just want to work on some lighting things now
[15:30:38] <vegard1992> considering im doing all this stuff tho
[15:30:44] <vegard1992> i might just go 3d top down
[15:31:22] <AbiBuccaneer> people have done some very cool things with lighting in 2D, but they're all somewhat more complex than "just do it in 3D"
[15:31:28] *** adsc has quit IRC
[15:31:49] <vegard1992> what do u mean
[15:32:36] <AbiBuccaneer> there have been cool demos of applying 3D lighting to 2D objects with normalmaps, and fake self-shadowing with lightmaps
[15:38:00] *** cden has quit IRC
[15:40:52] *** pazul has joined ##OpenGL
[15:43:57] *** Match has joined ##OpenGL
[15:44:50] *** ngladitz has quit IRC
[15:45:14] *** ngladitz has joined ##OpenGL
[15:46:06] *** wg1024 has joined ##OpenGL
[15:52:46] *** groton_ has joined ##OpenGL
[15:55:41] *** groton has quit IRC
[15:55:42] *** groton_ is now known as groton
[15:56:00] *** hexagoxel has quit IRC
[16:00:56] *** Zupo has joined ##OpenGL
[16:01:07] *** damir__ has quit IRC
[16:02:25] <vegard1992> ah
[16:02:27] <vegard1992> i see
[16:04:49] *** BitPuffin has joined ##OpenGL
[16:08:30] *** antonp has joined ##OpenGL
[16:15:41] *** meoblast001 has quit IRC
[16:17:15] *** ``Erik_ is now known as ``Erik
[16:25:28] *** wg1024 has quit IRC
[16:25:48] *** pazul has quit IRC
[16:27:04] *** antonp has quit IRC
[16:33:56] *** clauswitt has quit IRC
[16:37:59] *** dreamminder has quit IRC
[16:40:36] *** ClarusCogitatio has quit IRC
[16:40:47] *** telex has quit IRC
[16:42:49] *** telex has joined ##OpenGL
[16:43:04] *** ClarusCogitatio has joined ##OpenGL
[16:44:00] *** Garner has quit IRC
[16:44:29] *** wutata has quit IRC
[16:48:57] *** Biliogadafr has joined ##OpenGL
[16:54:41] *** DrBenway has quit IRC
[16:56:17] *** Garner has joined ##OpenGL
[16:58:13] *** Zupo2 has joined ##OpenGL
[17:00:25] *** Zupo has quit IRC
[17:04:59] *** shintahW has quit IRC
[17:12:29] *** redeemed has quit IRC
[17:16:34] *** Waynes1 has joined ##OpenGL
[17:19:05] *** Waynes has quit IRC
[17:25:14] *** neure has quit IRC
[17:28:46] *** staylor has joined ##OpenGL
[17:31:58] *** Zupo2 has quit IRC
[17:32:15] *** CrizMobius has quit IRC
[17:40:57] *** tm604 has quit IRC
[17:41:33] *** tm604 has joined ##OpenGL
[17:41:40] *** tm604 has quit IRC
[17:41:40] *** tm604 has joined ##OpenGL
[17:41:55] *** phr34k has joined ##OpenGL
[17:43:56] *** Plasmastar has quit IRC
[17:44:43] *** Plasmastar has joined ##OpenGL
[17:44:58] *** karab44 has quit IRC
[17:48:49] *** PasNox_ has quit IRC
[17:49:18] *** AbiBuccaneer is now known as AbigailBuccaneer
[17:51:10] *** Alina-malina has quit IRC
[17:51:44] *** Alina-malina has joined ##OpenGL
[17:56:56] *** ShadowIce has joined ##OpenGL
[18:00:08] *** Leates has joined ##OpenGL
[18:00:50] *** Alina-malina has quit IRC
[18:01:46] *** Alina-malina has joined ##OpenGL
[18:02:26] *** _Cid has joined ##OpenGL
[18:04:21] *** Viata has joined ##OpenGL
[18:05:25] <_Cid> when defining texture coordinates they are -1 to 1 as well right
[18:05:53] <Hunts> no, just 0 to 1
[18:05:56] <_Cid> ahh
[18:05:59] <_Cid> that may be my problem
[18:06:06] <_Cid> 0 y is bottom?
[18:06:23] <Hunts> yeah it is inverted
[18:06:29] <_Cid> ty
[18:06:39] *** SHLV has quit IRC
[18:11:22] *** zajfy has joined ##OpenGL
[18:15:25] *** ra4king has quit IRC
[18:16:01] <_Cid> so if I use glTexSubImage2D
[18:16:04] *** ra4king has joined ##OpenGL
[18:16:08] <_Cid> when it says xoffset and yoffset
[18:16:26] <_Cid> yoffset is 0 from top
[18:16:35] <_Cid> growing downward?
[18:16:45] <_Cid> xoffset is 0 from left growing right
[18:16:56] <slime> it's from the first row and column of the image
[18:17:07] <slime> that may be the top or the bottom, depending on how do you do things
[18:17:17] <_Cid> hm
[18:17:39] <slime> (same with texcoords)
[18:17:41] <_Cid> that's confusing
[18:18:09] *** Viata has quit IRC
[18:18:30] <_Cid> so I made a large sprite atlas which is one long texture
[18:18:43] <_Cid> width is total width of all images, height is max height of all images
[18:18:43] <slime> with no matrices or any kind of transforms done aside from assigning to gl_Position etc., then 0 is the bottom on the screen
[18:19:17] <slime> (assuming you make 0,0 be the bottom-left of whatever you draw)
[18:19:29] <slime> bottom-left texture coordinate rather
[18:19:31] <_Cid> that depends on vertex drawing right
[18:19:35] <_Cid> er
[18:19:38] <_Cid> the vertex coords
[18:19:49] <_Cid> ie the first vertex I draw needs to be bottom left right?
[18:20:03] <_Cid> then top left, top right, bottom right
[18:21:28] *** Ad1 has joined ##OpenGL
[18:26:38] *** stefkos has joined ##OpenGL
[18:28:17] *** tm604 has quit IRC
[18:31:01] *** Folkol has quit IRC
[18:31:04] *** tm604 has joined ##OpenGL
[18:31:39] *** tm604 has quit IRC
[18:31:39] *** tm604 has joined ##OpenGL
[18:32:25] *** glYoda has joined ##OpenGL
[18:36:56] *** ra4king has quit IRC
[18:38:40] *** TheBunnyZOS has joined ##OpenGL
[18:40:58] *** _leb has joined ##OpenGL
[18:43:57] *** erhan_ has quit IRC
[18:54:24] *** Misu has joined ##OpenGL
[19:03:14] *** ChrisUK has joined ##OpenGL
[19:08:25] *** ChrisUK has quit IRC
[19:08:37] *** ChrisUK has joined ##OpenGL
[19:13:38] *** damir__ has joined ##OpenGL
[19:18:22] *** ra4king has joined ##OpenGL
[19:18:43] *** ra4king is now known as Guest87943
[19:20:14] *** Guest87943 has quit IRC
[19:21:26] *** ra4king1 has joined ##OpenGL
[19:21:48] *** shingshang has quit IRC
[19:24:12] *** ra4king1 is now known as ra4king
[19:24:30] *** Shogun has joined ##OpenGL
[19:25:19] *** Match has quit IRC
[19:30:38] *** _leb has quit IRC
[19:30:41] *** hahuang65 has joined ##OpenGL
[19:33:52] *** foreignFunction has joined ##OpenGL
[19:33:57] *** stefkos has joined ##OpenGL
[19:40:16] *** groton has quit IRC
[19:45:46] *** groton has joined ##OpenGL
[19:56:57] *** CainJacobi has joined ##OpenGL
[19:57:56] *** Slion has joined ##OpenGL
[20:05:10] *** groton has quit IRC
[20:07:13] *** Ryp has joined ##OpenGL
[20:12:55] *** groton has joined ##OpenGL
[20:19:05] *** Ryp has quit IRC
[20:21:14] *** PasNox has joined ##OpenGL
[20:21:40] *** derhass has joined ##OpenGL
[20:31:09] *** PasNox has quit IRC
[20:32:14] *** Jack__ has joined ##OpenGL
[20:33:12] *** Garner has quit IRC
[20:34:27] *** roboman2444 has quit IRC
[20:35:36] *** Jack_ has quit IRC
[20:39:41] *** pizthewiz has joined ##OpenGL
[20:42:47] *** PasNox has joined ##OpenGL
[20:51:37] *** samrat has quit IRC
[21:00:44] *** Crehl has joined ##OpenGL
[21:02:24] *** roboman2444 has joined ##OpenGL
[21:07:32] *** groton has quit IRC
[21:24:29] *** snakenerd has quit IRC
[21:24:43] *** Shogun has quit IRC
[21:25:19] *** bkre__ has joined ##OpenGL
[21:25:52] *** Khlorghaal has joined ##OpenGL
[21:26:42] *** HOS_cr`nge has joined ##OpenGL
[21:29:34] *** urraka has quit IRC
[21:36:01] *** groton has joined ##OpenGL
[21:42:23] *** agorecki has joined ##OpenGL
[21:44:28] *** aethersis has joined ##OpenGL
[21:46:03] <aethersis> PFNGLGENFRAMEBUFFERSPROC
[21:46:05] <aethersis> CTHULHU!
[21:46:22] *** BreadProduct has joined ##OpenGL
[21:46:52] *** Leates has quit IRC
[21:47:02] *** Viata has joined ##OpenGL
[21:47:10] <Yaniel> Pointer to FunctioN * Procedure or something like that I guess
[21:48:20] *** Garner has joined ##OpenGL
[21:48:33] *** Demon_Fox has joined ##OpenGL
[21:48:34] <aethersis> yeah FU windows! Thank god I use linux
[21:49:08] <aethersis> anyway, I'm trying to understand FBO and what I'd like to make for the beginning would be something like this: load some image, then when I press spacebar, it will blur the image and render it to the texture
[21:49:16] <aethersis> and ofc redisplay it
[21:49:26] <aethersis> then when I press spacebar again, it will blur again the already blurred image
[21:50:04] <aethersis> now could you tell me how to access specific coordinates of texture/
[21:50:16] <aethersis> for blur I need something like NSWE
[21:50:33] <foobaz> aethersis: https://www.opengl.org/sdk/docs/man4/html/texelFetch.xhtml
[21:50:45] <aethersis> I will do something like this: current pixel = (N+S+W+E)/4
[21:51:00] <foobaz> you are supposed to use the middle pixel too
[21:51:40] <aethersis> that vec4 is RGBA?
[21:51:44] *** Leates has joined ##OpenGL
[21:51:58] <aethersis> current pixel = (current pixel + N+S+W+E)/4
[21:52:31] <foobaz> denominator must be 5 to match the numerator
[21:52:52] <aethersis> I;m not sure if it should be 5 in this case, I think it should be 4
[21:53:07] <foobaz> you have five pixels on the top
[21:53:24] <foobaz> if you only divide by 4, it will get 20% brighter every time you blur
[21:53:29] <aethersis> wait, I also need current pixel coordinate in the shader
[21:53:31] <aethersis> how do I get that
[21:54:04] <foobaz> imagine what happens if all the pixels are 1
[21:54:17] <foobaz> if the pixels are all the same, blurring should do nothing
[21:54:20] <aethersis> yeah you are right
[21:54:49] <foobaz> pass width and height to the vertex shader as uniforms
[21:55:14] <foobaz> or actually vertex attributes would work better
[21:55:51] <foobaz> give your four vertexes an attribute with these values: (0, 0), (0, height), (width, 0), (width, height)
[21:57:51] <aethersis> and how do I get the current position in the texture?
[21:58:17] <foobaz> interpolate the values between the vertexes with in/out variables
[21:58:38] *** DMJC-M has joined ##OpenGL
[21:58:52] <aethersis> I mean once I have this: gvec4 texelFetch( gsampler2D sampler, ivec2 P, int lod);
[21:59:02] <aethersis> I need something for P
[21:59:07] <aethersis> how do I determine it?
[21:59:15] <aethersis> and is that efficient at all?
[21:59:39] <Bloodust> a texture coordinate
[22:00:01] <Bloodust> also, why not just use texture or textureOffset?
[22:00:14] <aethersis> jesus it's all too confusing :/
[22:00:47] <aethersis> I could do it in a dumb way on a loop inside shader, but isn't that slow as hell?
[22:01:01] <Bloodust> nope
[22:01:24] <aethersis> faster than on CPU?
[22:01:34] <aethersis> I will explain what's the point of all this
[22:01:51] <Bloodust> blurring image on gpu is hell of a lot faster than on cpu
[22:02:01] <aethersis> I have a smoke simulator written on CPU. It's bottleneck is memory efficiency, the larger the grid, the slower it works and then it becomes slow as hell because of the damn loops
[22:02:10] <aethersis> I thought maybe it would be faster to do it on shaders, but without loops
[22:02:34] <aethersis> because fragment shader does the same operation for each fragment and that's the point - same operations are performed on each grid cell in my program
[22:02:54] <foobaz> it will be way faster on GPU
[22:03:00] <foobaz> like 100x faster if you do it right
[22:03:12] <aethersis> but if I do it using loops same like in my program, won't it be dead slow?
[22:03:36] <foobaz> yes, so don't use loops
[22:03:46] <Bloodust> depends how big the loops are obviously
[22:03:49] <aethersis> Bloodlust just suggested using loopps omg
[22:04:07] <Bloodust> theres nothing wrong with using loops
[22:04:07] <aethersis> I'm confused
[22:04:15] <Bloodust> just dont loop for millions of iterations durr
[22:04:29] <aethersis> it MUST loop through millions of iterations
[22:04:35] *** Defaultti has quit IRC
[22:04:42] <Stragus> Don't loop through millions in one go
[22:04:50] <Stragus> Queue many kernel launches
[22:05:02] <Stragus> Oops, this is OpenGL not CUDA, but same concept
[22:05:10] <aethersis> but can't it be done without loops at all?
[22:05:33] <aethersis> when I bind the shader it must do the gl_FragmentColor for each fragment, right?
[22:05:37] <Stragus> You'll parallelize all the operations over your grid of cells
[22:05:42] <Stragus> But you still need loops somewhere
[22:05:59] <Bloodust> aethersis use compute shaders
[22:06:00] <aethersis> so if there was a way to determine at which fragment I currently am , I could use this variable to get NSWE cells
[22:06:04] <Stragus> Compute shaders (or CUDA, or OpenCL) would be more appropriate to CFD than fragment shaders
[22:06:07] <aethersis> no way, no compute shaders
[22:06:10] <aethersis> only fragment shaders
[22:06:16] <roboman2444> for?
[22:06:25] *** Defaultti has joined ##OpenGL
[22:06:36] <Stragus> Then use vertex transform feedback
[22:06:47] <Bloodust> aethersis you use texture coordinates to determine which "location" you are in a texture
[22:07:08] <aethersis> smooth in vec2 vUV; like this?
[22:07:14] <foobaz> yes
[22:07:17] <aethersis> YESSS
[22:07:25] <aethersis> NOW this gets me somewhere
[22:07:31] <foobaz> "smooth" is the default for vec2 so you don't need to explicitly declare it
[22:07:36] <foobaz> "in vec2" would work the same
[22:07:48] <foobaz> and flat is the default for integer types
[22:07:59] <aethersis> so if I use this for ivec2 P in the sampler, it will get me the color, right?
[22:08:05] <foobaz> yes
[22:08:14] <aethersis> FINALLY
[22:08:22] <Bloodust> lol
[22:08:31] <foobaz> use texelFetchOffset to get NSEW because it's fast
[22:08:34] <aethersis> now, there will be no loops and it will be 100x faster!!!
[22:08:47] <Bloodust> aethersis you are a confusing person
[22:08:51] <aethersis> how come
[22:09:00] <Bloodust> first you want to make millions of loop cycles per fragment
[22:09:04] <Bloodust> and now suddenly you dont need any
[22:09:20] <aethersis> I didn;t mean loop cycles per fragment
[22:09:36] <aethersis> I meant iterating through whole image
[22:09:47] <aethersis> so if I have 100x100 image, there would be 10 000 loop passes
[22:10:05] <aethersis> but the fragment shader passes through it anyway so what'd be the point of having a loop? that'd be an overkill
[22:10:07] <Bloodust> rrright
[22:10:40] <foobaz> Bloodust: cut him some slack, he's polish :P
[22:10:59] *** Match has joined ##OpenGL
[22:11:01] *** Shogun has joined ##OpenGL
[22:11:02] <foobaz> it is amazing he got this far lol
[22:11:24] <aethersis> the beautiful thing about this program is that it can be directly parallelized - I designed it in such the way for further rewriting it into GLSL so that it will run much faster
[22:11:44] <Bloodust> well blurring something is really fast operation
[22:11:50] <Bloodust> how big is your grid?
[22:11:58] <aethersis> I want something like 1000x1000
[22:12:06] <aethersis> and then in 3d something like 200^3
[22:12:23] <aethersis> and then I will think about dirty tricks like adding wavelet noise for improving details depending on distance
[22:12:29] <aethersis> so that details will be adaptively added
[22:12:46] <Yaniel> let's not confuse him with the hw filtering trick
[22:12:49] <Bloodust> 1000x1000, blur with 3 pixel blur radius is like probably < 1ms
[22:13:00] <aethersis> AWESOME
[22:13:20] <aethersis> now I will make it at least as good as nvidia flameworks!
[22:13:34] <aethersis> I got all the concepts already implemented and working in 2D
[22:13:41] *** Slion has quit IRC
[22:13:44] <aethersis> time to do it in 2d on GPU and then in 3D
[22:13:51] <foobaz> you should make a demo
[22:13:57] <aethersis> I have one
[22:14:01] <foobaz> put some fat beats on top of your smoke
[22:14:05] <foobaz> i mean like a demoscene demo
[22:14:20] <aethersis> https://www.youtube.com/watch?v=Zl0_FSi0Kno
[22:14:51] <Bloodust> not very fat beats
[22:15:04] <aethersis> 5th symphony is fat enough!
[22:15:10] <Bloodust> too often used
[22:15:35] <aethersis> now would u believe that I was playing it in my mind when playing with the program and then I added the soundtrack in youtube and it seems to match @,@
[22:16:29] <foobaz> i would
[22:17:04] <aethersis> I play piano so I think I must have good memory for music because I can't play directly from sheet music. I memorize everything so that I can play from memory
[22:17:54] <foobaz> i play keyboard
[22:17:58] *** skarn has quit IRC
[22:17:58] <aethersis> awesome! :D
[22:18:12] <foobaz> it is the best instrument for programmers because our fingers are so nimble :)
[22:18:23] <aethersis> I have mechanical keyboard for that too xD
[22:18:28] <aethersis> foobaz, what did you tell me to use instead of sampler?
[22:18:30] <aethersis> I forgot :/
[22:18:32] <aethersis> the faster thing
[22:18:33] <foobaz> http://www.teenageengineering.com/products/op-1/ :)
[22:18:34] <aethersis> texel something
[22:18:41] <foobaz> texelFetchOffset
[22:18:42] <Yaniel> texelFetch
[22:18:47] <aethersis> ewww I'd hardly call this keyboard
[22:18:49] <Yaniel> that uses samplers too though
[22:18:54] <aethersis> it's like a toy
[22:19:05] <aethersis> but you say it's faster
[22:19:10] <aethersis> it must be the fastest thing possible
[22:19:13] <Yaniel> but no filtering
[22:19:16] <aethersis> so fast that coils start whizzing
[22:19:17] <foobaz> judge me by my size do you?
[22:19:21] <aethersis> xDDD
[22:19:46] <aethersis> when I made a strange attractor simulation as a cloud of points, coils started whizzing in my GPU
[22:19:53] <aethersis> it simulated something like 10M particles
[22:20:30] <Bloodust> its very common phenomenom
[22:21:55] <aethersis> I was like HAHA! BURN BURN BURN!
[22:25:55] <aethersis> what's that LOD in the sampler?
[22:26:26] <Bloodust> level of detail, determines which mipmap to use
[22:26:31] <Bloodust> 0 if you have no mipmaps
[22:27:43] <aethersis> so I guess 0 by default
[22:29:59] <aethersis> http://pastebin.com/MLC5QUB4
[22:30:01] <aethersis> it's not working :/
[22:30:33] <Yaniel> what are your uv coords
[22:30:59] <aethersis> first of all, normally it should work?
[22:31:20] <Yaniel> no
[22:31:29] <Yaniel> glsl does not allow f suffixes
[22:31:38] <aethersis> it compiled
[22:31:48] <Yaniel> so you are on nvidia :D
[22:31:54] <aethersis> ohoho wait
[22:33:26] <aethersis> it's working
[22:35:04] <Yaniel> still, change 5.f to 5.0
[22:35:10] <aethersis> I mean it compiles but it doesn't work correctly
[22:35:16] <Yaniel> I think 5. is okay too
[22:35:26] <aethersis> and yes, I have nvidia
[22:36:47] <aethersis> what happens if I cast vec2 to ivec2?
[22:36:50] <aethersis> it just truncates?
[22:36:56] *** meoblast001 has joined ##OpenGL
[22:37:07] <foobaz> yes
[22:37:09] <aethersis> OMG IT IS WORKING NOW!
[22:37:09] <Yaniel> probably
[22:37:12] <aethersis> THANK YOU SO MUCH!!!
[22:37:12] <Yaniel> check the spec to make sure
[22:37:28] <aethersis> I made a blur filter!!! <3
[22:37:55] <aethersis> I just forgot to do this: ivec2 UV = ivec2(vUV*512);
[22:38:03] <Yaniel> now make it a two-pass gaussian one
[22:38:15] <aethersis> I don't need it xD
[22:38:19] <Yaniel> so I guess your uvs are 0..1
[22:38:23] <aethersis> yes
[22:38:28] <Yaniel> texelFetch takes the pixel position
[22:38:29] <aethersis> I need to make it work on FBO now
[22:38:39] <Yaniel> as opposed to normalized coordinates
[22:38:41] <aethersis> because I made it work in a straightforward way
[22:38:51] <aethersis> that's good it does it
[22:38:58] <aethersis> so you say it's ultra-hyper fast?
[22:39:18] <Yaniel> well, 3x3 is not much
[22:39:24] <Yaniel> and that code you pasted is not even 3x3
[22:39:36] <aethersis> what do you mean by 3x3
[22:39:42] <aethersis> convolution matrix or what?
[22:40:03] *** leb has joined ##OpenGL
[22:40:23] *** tkeemon has joined ##OpenGL
[22:40:36] <Yaniel> well you just average the 4 closest + the current fragment
[22:40:41] <aethersis> mhm
[22:40:46] <aethersis> it's 3x3 convolution matrix
[22:40:57] <aethersis> a sparse one xD
[22:40:59] <Yaniel> 3x3 would also mean taking into account the adjacent ones to the center
[22:41:17] <aethersis> like NE, NW etc?
[22:41:27] <Yaniel> well, practically your filter just assigns those a weight of 0
[22:41:32] <aethersis> I know :D
[22:41:42] <Bloodust> mightaswell use texelFetchOffset if all the pixels are nearby
[22:41:45] <aethersis> but the smoke machine uses only Moore neighbourhood
[22:41:48] <aethersis> no need for von neumann
[22:42:30] *** Dark_Confidant|m has joined ##OpenGL
[22:42:31] *** Dark_Confidant has quit IRC
[22:42:40] <aethersis> what's that offset in texelFetchOffset?
[22:42:44] *** Viata has quit IRC
[22:43:01] <Yaniel> let's see what the manpage says
[22:43:27] <Bloodust> it takes ivec2 pixel offset
[22:43:40] <aethersis> I read it but I don't understand
[22:43:47] <Bloodust> the offset is a different parameter
[22:43:48] <Yaniel> basically you give it a texture coordinate
[22:43:49] <aethersis> and it says it takes int for offset
[22:43:54] <Yaniel> and an offset that is added to that
[22:44:02] <aethersis> but it's int
[22:44:07] <aethersis> not ivec2
[22:44:15] <aethersis> if it was ivec2, it would make sense
[22:44:26] <Bloodust> replaces this texelFetch(textureMap, ivec2(vUV.x, vUV.y-1), 0); with this texelFetchOffset(textureMap, ivec2(vUV.x, vUV.y), ivec2(0, -1), 0);
[22:44:42] <Bloodust> oh right
[22:44:44] <Bloodust> offset is int for some reason
[22:44:49] <aethersis> yeah but the man page gives a different prototype
[22:44:50] <Bloodust> wadafak
[22:44:52] <aethersis> XD
[22:44:56] <aethersis> maybe it's erratic?
[22:44:58] <aethersis> let's try
[22:45:07] * Yaniel digs up the spec
[22:45:37] <foobaz> the man page is wrong, it takes an ivec2
[22:46:06] <aethersis> aggreed
[22:46:14] <aethersis> omg how can a man page be wrong
[22:46:18] <aethersis> I actually tested it and it worked
[22:46:28] <Yaniel> it is not the first time that gl manpages are wrong
[22:46:34] <aethersis> it's unacceptable
[22:46:39] <Yaniel> the spec lists all ivec versions
[22:47:13] <Bloodust> http://i.imgur.com/mpPppjh.png
[22:47:14] <aethersis> is that texelFetchOffset faster?
[22:47:25] <Bloodust> could be
[22:47:33] <Yaniel> the compiler can batch reads with it
[22:47:43] <aethersis> how do you know that :o
[22:47:49] <Yaniel> since the offsets have a upper limit
[22:47:57] <Yaniel> and must be constant
[22:48:00] <Bloodust> when I compared textureOffset and texture, there was a slight visual change but I have no idea why that happened
[22:48:58] <Yaniel> basically the compiler can replace multiple texelFetchOffset calls with a single texture read operation to read texels from P+minOffset to P+maxOffset
[22:49:11] <aethersis> it's not working as intended
[22:49:19] <aethersis> it kinda made a mosaic of my image
[22:49:22] <Yaniel> (...if it is smart enough)
[22:49:23] <aethersis> like it's made of tiles
[22:49:25] <aethersis> weird
[22:49:37] <aethersis> I did this for test:
[22:49:37] <aethersis> d
[22:49:43] <aethersis> <Yaniel> since the offsets have a
[22:49:45] <aethersis> wtf
[22:49:47] <aethersis> clipboard fucked up
[22:49:52] <aethersis> vec4 C = texelFetchOffset(textureMap, UV, 0, UV);
[22:49:59] <aethersis> vFragColor = C ;
[22:50:08] <Yaniel> umm
[22:50:17] <Yaniel> you basically tell it to read from UV+UV
[22:50:20] *** TechEffigy has joined ##OpenGL
[22:50:20] <aethersis> XD
[22:50:23] <aethersis> ahhh right
[22:50:27] <Yaniel> did you even read the docs?
[22:50:39] <Yaniel> at least the part where it shows the function prototype
[22:50:48] <aethersis> I should substitute ivec2(0,0) to have what I want
[22:50:49] <aethersis> right
[22:50:58] <Yaniel> or just ivec2(0) :P
[22:51:13] *** Beetny has joined ##OpenGL
[22:51:42] <aethersis> AWESOME
[22:51:47] <aethersis> now this is some uber ultra fast code
[22:51:53] <Yaniel> hehe
[22:52:00] <aethersis> now I will do it on FBO
[22:52:08] <Yaniel> oh right, you need that for your simulation
[22:52:25] <aethersis> and once I figure it out, then rewriting the simulation to glsl shouldn't be hard
[22:52:30] <aethersis> because that was the only confusing thing about it
[22:52:36] <Bloodust> fbo part might take a while
[22:52:40] <aethersis> the rest is very straightforward. There is no advanced maths
[22:52:40] <Yaniel> doing it on a FBO is hardly different from the screen
[22:52:46] <Yaniel> except for the part where you have to set up the FBO
[22:52:51] <aethersis> I know :D
[22:52:59] <aethersis> I already read some code working on FBO
[22:53:09] <aethersis> i will just render it to texture and then display it
[22:53:11] *** tehrain has quit IRC
[22:53:15] <Bloodust> two FBOs if you want to do the "blur the blurred texture" part
[22:53:27] <aethersis> why's that?
[22:53:29] <aethersis> Ahhh
[22:53:32] <aethersis> right
[22:53:41] <aethersis> very good you told me about it
[22:53:54] <Bloodust> because you cant render to a texture you are reading from
[22:53:55] <aethersis> I'd do the very same error like a few weeks ago, but with a different thing
[22:53:58] <aethersis> yes yes
[22:54:23] <aethersis> you just probably saved me a few sleepless nights, bloodlust
[22:54:37] <Yaniel> hmm I'm not sure anymore if writing my own png loader was a good idea
[22:54:48] <Yaniel> it's not like it is a scary thing by itself
[22:54:49] <aethersis> there's a SOIL library
[22:54:56] <Bloodust> Yaniel its not
[22:55:00] <Yaniel> which kinda breaks with core profile
[22:55:00] <Bloodust> f SOIL
[22:55:02] <foobaz> i would use at least three FBOs for performance so opengl can pipeline
[22:55:02] <Bloodust> freeimage <3
[22:55:29] <foobaz> first blur A into B, then blur B into C, then blur C into A and repeat
[22:55:34] <aethersis> don't worry foobaz, when time comes, I will spam you with performance and stupid issue questions
[22:55:37] <Yaniel> Bloodust: it was all fun and games until I decided I need a insertByte() function which may or may not end up writing a pixel to the final image
[22:55:49] <aethersis> there are 3 textures needed
[22:55:53] <foobaz> obviously that's a lot more important with stuff like smoke where you need to continue iterating
[22:56:02] <aethersis> one for u component of velocity, one for v component, one for densities
[22:56:08] <aethersis> actually 6
[22:56:18] *** skarn has joined ##OpenGL
[22:56:18] <aethersis> u,u0, v,v0, d,d0
[22:56:21] <aethersis> where 0 is old
[22:56:30] <aethersis> so I will need 9 for FBOs?
[22:56:56] *** HOS_cr`nge has quit IRC
[22:56:58] <aethersis> I will have to copy u,v and d to something I can display?
[22:57:14] <Majiet> hi
[22:57:29] <aethersis> hi Majiet
[22:57:32] <Bloodust> aethersis how many actual floats do you need?
[22:57:47] <aethersis> 6 maps NxN
[22:57:47] *** damir__ has quit IRC
[22:57:55] <Yaniel> aethersis: a FBO is basically just something you attach your textures to when you want to draw on them
[22:58:01] <Bloodust> way to avoid the question
[22:58:25] <foobaz> 9 textures, 3 FBOs with 3 textures each?
[22:58:28] <aethersis> actually it could be reduced to 2 maps NxN
[22:58:43] <aethersis> if I stored u in R channel, v in G channel and d in B channel
[22:59:03] <aethersis> because it's already done in such the way that everything is clamped to 0:1
[22:59:04] *** centrinia has joined ##OpenGL
[22:59:17] <aethersis> well, not exactly but it oscillates around these values XD
[23:00:00] *** centrinia has quit IRC
[23:00:08] <aethersis> owait, if I have RGBA as floats, is it truncated to 8 bit per channel?
[23:00:30] <Bloodust> up to you
[23:00:46] <aethersis> what's the maximum bit depth
[23:00:51] <Bloodust> you can have 32
[23:00:54] <aethersis> WHAT
[23:00:58] <aethersis> 32 bit per channel?!?!
[23:01:02] <Stragus> int32_t or floats, yes
[23:01:05] <aethersis> :OOO
[23:01:11] <aethersis> that's incredible
[23:01:19] <aethersis> now this solves all problems
[23:01:21] <Bloodust> obviously its fat
[23:01:25] <aethersis> yeah
[23:01:34] <Bloodust> eats a lot more bandwidth than 8s
[23:01:47] <foobaz> hell, in opengl 4, you can have 64 bits per channel
[23:01:49] <aethersis> oh, that is the problem I think
[23:01:54] <aethersis> :O 64 bits
[23:02:01] <Yaniel> don't worry, I was planning on having like 4 float textures in my FBO
[23:02:07] <aethersis> I bet even aliens can't differ so many colours xD
[23:02:08] <Yaniel> all RGBA
[23:02:08] <Bloodust> wasnt aware of that addition, although I was kind of expecting that
[23:02:39] <aethersis> but I guess the reason behind it is not colour storage
[23:02:49] <Bloodust> foobaz its not in the man pages tho
[23:03:19] <Bloodust> aethersis 16 bit or 32 bit for hdr rendering
[23:03:40] <Bloodust> you can see the difference between 8b and 16b with normal rendering and lighting
[23:05:33] <Bloodust> foobaz its not in the spec either
[23:05:36] <Bloodust> you lying bastar
[23:05:36] <Bloodust> d
[23:05:46] <Yaniel> is it still an extension?
[23:05:56] *** jdolan has quit IRC
[23:07:53] <foobaz> sorry, you're right
[23:08:02] <foobaz> it looks like opengl 4 added doubles for everything except textures
[23:08:11] <foobaz> i thought they added doubles to everything
[23:08:12] <Yaniel> at ARB stage IIRC but still extension
[23:08:19] <aethersis> doubles are overkill
[23:09:04] <foobaz> yea you could probably get by with 16-bit floats
[23:09:29] <Yaniel> Bloodust: anyway after the png loader I had planned on doing a fft convolution filter and see if I can make it work in realtime
[23:09:42] <Yaniel> sometimes I'm not very smart
[23:09:58] <Yaniel> (2d convolution in glsl)
[23:10:01] <Bloodust> :D
[23:10:27] *** HOS_cr`nge has joined ##OpenGL
[23:10:27] <foobaz> why not just use lodepng?
[23:10:38] <Yaniel> and I'm still not sure if I understood correctly what the guys at inTheory are doing
[23:10:46] *** telex has quit IRC
[23:10:55] <Yaniel> foobaz: think of it as a learning exercise?
[23:10:58] <aethersis> does if/else in GLSL make a cosiderable slowdown?
[23:11:04] <Bloodust> no
[23:11:09] <aethersis> very well
[23:11:15] <aethersis> because I have to limit stuff
[23:11:21] <aethersis> if(UV.x>0 && UV.x<511 && UV.y>0 && UV.y<511)
[23:11:28] <Bloodust> for example, the fxaa shader uses if's a lot and its really fast
[23:11:29] <Yaniel> aethersis: if most or all fragments take the same code path, no
[23:11:41] <aethersis> yeah most of them do
[23:11:45] <aethersis> it just works for borders
[23:12:07] <Yaniel> if fragments in the same warp take different paths, it will execute both
[23:12:26] <foobaz> what exactly are you learning? how to read a spec, parse a binary format, and call zlib functions? you already know that stuff :)
[23:12:49] <Yaniel> practicing C mostly
[23:12:49] *** telex has joined ##OpenGL
[23:12:57] <aethersis> C is awesome! <3
[23:13:08] <aethersis> I write all simulations in C or C++ when I really really need vectors
[23:13:08] <Yaniel> and working on keeping the code clean
[23:13:21] <Yaniel> I try to keep it C89 :D
[23:13:27] <Yaniel> again, not a very smart choice
[23:13:29] <aethersis> pomg xD
[23:13:33] <Yaniel> oh and I use miniz for the zlib part
[23:13:34] *** leb has quit IRC
[23:13:35] <aethersis> C89 is a bit old
[23:13:38] <aethersis> use C99
[23:13:40] <Bloodust> C is not awesome, C++ is awesome with GLM
[23:13:45] <Bloodust> PS. you want glm
[23:13:52] <Yaniel> naah
[23:14:02] <aethersis> glm can be used for general purpose math too, right?
[23:14:03] <Bloodust> do it
[23:14:03] <Yaniel> I'll go with something more C
[23:14:05] <Yaniel> and SIMD
[23:14:14] <aethersis> Yaniel, pthread :D
[23:14:27] <foobaz> SIMD is not threading
[23:14:31] <Yaniel> I know, that might do bad things to ones sanity
[23:14:33] <aethersis> yeah right
[23:14:38] <aethersis> so OpenCL xD
[23:14:41] <Yaniel> pthreads is on my list too
[23:14:47] <aethersis> pthreads are nice
[23:14:56] <Yaniel> I've already used it in some places
[23:15:10] <aethersis> I used them once for more efficient implementation of SOR method
[23:15:21] *** groton has quit IRC
[23:15:21] <aethersis> it's for solving poisson differential equations
[23:15:35] <aethersis> I need it in my solver for calculating velocity gradients for hodge decomposition so that they are mass-conserving
[23:15:38] <Yaniel> basically I'm working on a 3d game engine in C while my friend is doing the same in C++11 :D
[23:15:52] <aethersis> you will see who will get the job done faster lol
[23:15:53] <Yaniel> needless to say, I'm quite a bit behind
[23:15:56] <aethersis> xD
[23:15:57] <TheBunnyZOS> haha
[23:16:08] <TheBunnyZOS> why are you behind?
[23:16:14] <aethersis> because C xD
[23:16:17] <Yaniel> I haven't had time to code either
[23:16:44] <Yaniel> we have this army thing here that eats a year of my time
[23:16:48] <TheBunnyZOS> Im not betting on the C being the problem :)
[23:16:50] <aethersis> imagine you have to do all the stuff glm does for you by hand + 100x more different problems
[23:16:52] <Yaniel> minus weekends and some evenings
[23:17:02] <Yaniel> aethersis: write once, use everywhere
[23:17:12] <aethersis> use Java then :D
[23:17:18] <TheBunnyZOS> glm is nice but here sare plenty of math libs etc and there should be nice C ones ready to go
[23:17:19] <aethersis> or JS and WebGL
[23:17:20] <Stragus> C isn't slower to code if you already built up your own personal stack of common reusable code... as most programmers do over the years
[23:17:27] <Yaniel> ^
[23:17:33] <Yaniel> what my real goal is
[23:17:36] *** centrinia has joined ##OpenGL
[23:17:39] <TheBunnyZOS> SDL2 etc is stil C and you have other building blocks
[23:17:52] <TheBunnyZOS> Not that I would ever make an engine in C ;)
[23:17:53] <Yaniel> and one of the reasons I try to keep it as nice and tidy as I can
[23:18:06] <aethersis> I think writing custom game engines now doesn't make much sense
[23:18:10] <TheBunnyZOS> I have seen AAA game engines in C that were a lot simpler to read then C++ anyday
[23:18:10] * Stragus codes absolutely everything in C ... or CUDA
[23:18:11] <aethersis> unless oyu want something very specialized
[23:18:41] <aethersis> foobaz, would it be hard to turn my fluid solver into some framework usable in computer games?
[23:18:47] <aethersis> I mean once I had it coded as shaders
[23:18:52] *** bjz has quit IRC
[23:19:02] <aethersis> or should I choose a completely different approach to make it avalible
[23:19:14] <Yaniel> aethersis: shaders might be usable already
[23:19:18] <Yaniel> in the end Ill end up linking against libpng anyway though :D
[23:19:22] *** TechEffigy has quit IRC
[23:19:24] <Yaniel> because freetype needs it
[23:19:32] <Majiet> how did you guys manage threads ? just asking out of curiosity ?
[23:19:34] <foobaz> i think you should focus on getting something working before trying to turn it into a library
[23:20:02] *** _leb has joined ##OpenGL
[23:20:15] <Yaniel> foobaz: how about a single c file that does its job well
[23:20:51] <Yaniel> pretty much like stb_image
[23:20:51] *** konom has quit IRC
[23:21:00] <aethersis> I just wonder if I really make it working well, will people be interested in using it
[23:21:20] <foobaz> Yaniel: what about it?
[23:21:25] <Stragus> You should use compute shaders though
[23:21:34] <Yaniel> well that's how I am working on it
[23:22:06] <Yaniel> then using the engine as a sandbox/background setting for testing the separate modules
[23:22:10] <aethersis> nnonono no compute shaders
[23:22:45] <Yaniel> atm it doesn't really deserve being called an engine yet but that is what I plan on having it end up as
[23:23:15] <Yaniel> aethersis: might be interesting to see if you can render your simulations to textures and use them instead or as particle systems in a scene
[23:23:22] <Yaniel> that would be well usable
[23:23:48] <aethersis> like a sprite? xD
[23:23:57] <Yaniel> exactly
[23:24:09] <Yaniel> some games use canned video clips as sprites
[23:24:20] <Yaniel> actually, probably most recent AAA games do
[23:24:26] <aethersis> well, how;d you make a sprite interact with a character in 3d game lol
[23:24:32] <aethersis> what's AAA game
[23:24:51] <aethersis> oh snap, the worst thing will be making 3d interaction!!!
[23:24:57] <aethersis> I will have to voxelize a 3d model omfg
[23:24:59] <Yaniel> the high end stuff by big studios basically
[23:25:17] <Majiet> studios getting payed by a big publisher
[23:25:25] <aethersis> it will have to turn eveyrthing into minecraft to work
[23:25:29] <Majiet> EA, Sony etc.
[23:25:32] <Yaniel> interaction with the environment would involve finding the objects that overlap with the sprite
[23:25:41] <Yaniel> and approximating those somehow in the simulation
[23:25:47] <Yaniel> you won't have many objects there though
[23:26:08] <TheBunnyZOS> voxelize a 3d model omfg …. is not that hard you can find plenty of examples or things on LOD systems etc… level of detail.
[23:26:08] <aethersis> they will have to be minecraft
[23:26:14] *** TechEffigy has joined ##OpenGL
[23:26:26] <aethersis> to match the fluid domain
[23:26:42] <aethersis> and there's yet another problem - letting particles leave domain
[23:26:49] <Yaniel> just kill them
[23:26:54] <aethersis> no, it will look like shit
[23:27:09] <aethersis> I have certain idea for it
[23:27:14] <aethersis> i.e. having 2 domains
[23:27:19] <Yaniel> possible
[23:27:23] <aethersis> while the second one is much bigger but takes much simpler computations
[23:27:37] <aethersis> so it doesn't compute velocity gradients anymore, it just advects and diffuses
[23:27:58] <aethersis> soething like that, but it's a distant future
[23:28:06] <Yaniel> and maybe fade stuff out a bit faster in the outer domain
[23:28:11] <aethersis> first I need it in 2d on GLSL to enjoy it and have more motivation for work
[23:28:18] <aethersis> yes, higher diffusion
[23:28:28] <aethersis> but it'd have to be done in a very smart way
[23:28:30] <aethersis> gradually
[23:28:42] <aethersis> there are lots of dirty tricks and hacks for that I can think about
[23:28:47] <Yaniel> yes
[23:29:14] <aethersis> can't wait to see my 2d demo in HD :D
[23:29:22] <aethersis> I bet gpu will handle it
[23:29:31] <aethersis> CPU can hardly do 256x256 grid lol
[23:32:42] *** TechEffigy has quit IRC
[23:33:25] *** robot-beethoven has joined ##OpenGL
[23:35:54] <Yaniel> the animations are done entirely in the vertex shader
[23:36:14] <Yaniel> and the butterfly mesh is written by hand :D
[23:36:42] <aethersis> nice
[23:36:47] <aethersis> omg by hand
[23:36:56] <aethersis> I'd find out a parametric equation :p
[23:37:07] <aethersis> I used to be pretty good at it
[23:37:08] <Yaniel> meh it's just a few quads
[23:37:11] *** roboman2444 has quit IRC
[23:37:20] <aethersis> what about the tree?
[23:37:23] <Yaniel> and a texture fit onto it
[23:37:27] <aethersis> imported model or parametric?
[23:37:33] <Yaniel> modeled by a friend, loaded from .obj
[23:37:47] <Yaniel> so not very exciting
[23:37:49] <aethersis> if I had your skills
[23:37:58] <aethersis> I'd do so much of fucking crazy math stuff
[23:38:05] *** TunnelCat has joined ##OpenGL
[23:38:05] <aethersis> because I have all of it in my head
[23:38:08] <Yaniel> I had a lot of fun tweaking the blur on those butterflies
[23:38:10] <Yaniel> and the MRT
[23:38:12] <aethersis> like making trees, solving fluids, making AI etc
[23:38:19] <aethersis> all the algorithms and maths in my head
[23:38:25] <aethersis> but I don't have a tool to visualise them
[23:38:35] <aethersis> I feel like beethoven who got deaf
[23:38:50] *** maxton has quit IRC
[23:39:16] <Stragus> If you have it "in your head" but you can't put it in code, then maybe you haven't understood the problem yet :)
[23:39:28] <aethersis> no< i just don't know proper tools
[23:39:42] <Stragus> Tools? Any C compiler will do
[23:39:50] <aethersis> http://th06.deviantart.net/fs71/PRE/f/2012/062/b/e/sea_shell_by_aethersis-d4rln8x.jpg
[23:39:54] <Yaniel> or you are missing the logic to translate it to code
[23:39:55] *** urraka has joined ##OpenGL
[23:39:58] <aethersis> X():2*(1-2.718281828^(u/(6*pi)))*cos(u)*cos(v/2)^2
[23:39:58] <aethersis> Y():2*(-1+2.718281828^(u/(6*pi)))*cos(v/2)^2*sin(u)
[23:39:58] <aethersis> Z():1-sqrt(3)^(u/(2.13*pi))-sin(v)+2.718281828^(u/(6*pi))*sin(v)
[23:39:58] <aethersis> [u]:0, 16*pi
[23:39:58] <aethersis> [v]:, 8*pi
[23:40:31] *** DrBenway has joined ##OpenGL
[23:40:36] <aethersis> no, I just need to learn opengl so that I can visualize everything I have in my head. This fluid solver will be the first thing to start with
[23:41:37] <aethersis> then I will make a procedural solar system
[23:41:54] <foobaz> i made a procedural solar system once :)
[23:41:59] <Yaniel> it was terrible?
[23:42:02] <aethersis> same but in 2d
[23:42:19] <aethersis> the nice feture it had was that it had orbital mechanics implemented
[23:42:27] <aethersis> and I made an algorithm for calculating stable orbits
[23:42:37] <Stragus> I made that once... in DOS with some very clumsy 3D, the planets had 20 polygons
[23:42:43] <aethersis> XD
[23:42:53] <aethersis> I'd want to make one wher you can land on planets
[23:43:31] *** DMJC-M has quit IRC
[23:43:39] <Yaniel> LOD domain all the things
[23:43:49] <Yaniel> else you are screwed
[23:44:02] <foobaz> my solar system even had moons, it was hard to make it all stable
[23:44:11] <aethersis> N-body problem
[23:44:15] <foobaz> yep
[23:44:20] <aethersis> I kinda solved it XD
[23:44:23] <Stragus> Yes... If the bodies are too close to each other, it doesn't stay stable very long
[23:44:25] <foobaz> there is no exact solution but euler's method worked well enough
[23:44:31] <aethersis> I had it all described on my blog I deleted because nobody was visiting it
[23:44:33] *** tkeemon has quit IRC
[23:44:47] <foobaz> i learned that, i had to space the orbits by a factor of 1.7 or so
[23:44:54] <aethersis> XD
[23:44:59] <aethersis> now you are getting to some crazy concept
[23:45:24] <aethersis> I forgot what it was called, but some astronomer discovered that all solar systems ever discovered follow certain geometric rule with respect to planet distances
[23:45:28] <foobaz> anything less than that and they dragged each other out of orbit
[23:45:42] <aethersis> it's something like fibonacci sequence - nobody can give a full explanation of WHY
[23:45:42] <Stragus> aethersis, that was pretty much false, just a coincidence for our own solar system
[23:45:50] <aethersis> oh really? :<
[23:46:02] <aethersis> I thought he was right
[23:46:20] <Stragus> Well, in the case of our solar system, it kind of works
[23:46:46] <aethersis> btw I had exact solution for 2d but I couldn't find one for 3d
[23:46:54] <aethersis> because there are infinitely many possibilities
[23:47:00] <aethersis> even for 2 bodies
[23:47:18] <aethersis> with a set velocity I mean
[23:47:21] <Stragus> Exact solutions are for mathematicians, programmers deal with floats with 23 bits of mantissa :)
[23:47:36] <aethersis> I did it analytically
[23:47:47] <aethersis> for 2d you can go clockwise or counter-clockwise
[23:48:01] <aethersis> in 3d you can go clockwise or counter-clockwise but in any direction
[23:48:06] <aethersis> that was the problem xD
[23:48:15] <aethersis> and it almost made me bald
[23:48:31] <foobaz> clockwise and counterclockwise are the same thing with opposite direction
[23:48:41] <foobaz> so saying "any direction" already includes clockwise and counterclockwise
[23:48:42] <aethersis> I mean in 2d it's on plane
[23:48:46] <aethersis> but in 3d it's on sphere
[23:49:02] <aethersis> wait
[23:49:05] <aethersis> in 2d it's on circle
[23:49:08] <aethersis> in 3d it's on sphere
[23:49:12] <aethersis> that's what i mean by any direction
[23:51:06] <aethersis> http://www.jameshedberg.com/img/samples/classical_Atom_Orbits.jpg
[23:51:09] <aethersis> like this, you get it
[23:51:38] <aethersis> so solution of the system of equations evaluates to R^3 space
[23:52:06] <aethersis> there are infinitely many solutions for xyz components of the velocity vector for stable orbit around the sun
[23:52:10] <foobaz> how about https://en.wikipedia.org/wiki/Klemperer_rosette
[23:52:34] <aethersis> nonono it's too late for it xD
[23:52:43] <aethersis> my brain will overheat again and I will be unable to sleep xD
[23:53:18] <aethersis> I think it would be easier to describe the solution with polar coordinates but I got too tired to try it
[23:53:25] <aethersis> or with complex numbers
[23:53:46] <aethersis> complex vector... jesus, that would do the job :o
[23:54:38] <foobaz> how about a quaternion?
[23:54:51] <foobaz> quaternions are to complex numbers as complex numbers are to reals
[23:55:22] <aethersis> yes that's what I mean
[23:55:32] <aethersis> kinda
[23:55:33] <aethersis> no
[23:55:37] <aethersis> complex would suffice I think
[23:55:51] <Stragus> I believe octonions are a minimum, who works with anything less than 8 dimensions?
[23:55:53] <aethersis> or maybe... I'd have to try
[23:55:57] <Yaniel> vector<vec4> nothing wrong with that
[23:56:05] <aethersis> I mean on paper XD
[23:56:17] <Yaniel> Stragus: IIRC tensors start at 10
[23:56:24] <Yaniel> and nobody really knows what they are anyway :D
[23:56:30] <aethersis> what is IIRC
[23:56:38] <Yaniel> if I recall correctly
[23:56:39] <foobaz> pretty sure you can have a 2d tensor
[23:56:41] <foobaz> if not 1d
[23:56:45] *** DMJC-M has joined ##OpenGL
[23:56:54] <aethersis> 1d tensor wouldn't be a tensor xD
[23:56:57] <foobaz> tensors are just functions with multiple return values
[23:57:07] *** BitPuffin has quit IRC
[23:57:20] <aethersis> foobaz that's an interesting way of thinking about them
[23:57:25] <aethersis> I like it
[23:58:09] <aethersis> maybe one day I will rewrite my solver to solve compressible flows and then I will need stress tensor
[23:58:19] <aethersis> tensor field lol
[23:59:49] *** seangrove has quit IRC
top

   November 7, 2014  
< | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | >