Sik
|
|
« Reply #4980 on: October 25, 2015, 03:30:20 PM » |
|
Well, MinGW was last updated in 2005 I think and relies on the ancient MSVC 6.0 runtime which probably doesn't even match GCC's expectations anymore. I never had any serious issues with MinGW-w64 (while I constantly had issues with MinGW not supporting stuff) so there's that. Well, cross compiler problems aside, but that's because every library insists on having its own way to cross compile (argh!).
For the record, relative mouse movements on SDL2 is... kind of a sore point for starters, outside of OSX at least. I don't recall if the situation got better or not though, I should recheck.
|
|
|
Logged
|
|
|
|
gimymblert
|
|
« Reply #4981 on: October 25, 2015, 03:44:18 PM » |
|
Python 2 and 3 are always completely separate, so you won't clobber one with the other. It's a bit confusing to have both on your system, and I'd recommend removing python 2 if you don't need it. In any case, you can write "pip3" rather than "pip" to force using the Python 3 version of pip - it'll know to only access python 3 packages, and install them into python 3 installation area. Assuming you have Python 3.4 or later, pip comes bundled, so you should just need type
pip3 install theano
and it'll do the rest, including downloading all required dependences. But theano has a great deal of dependencies and is still not version 1.0, so something could go wrong.
To be frank I know nothing about that pip boy, also I still need it not for theano, so ... For example i Wanted to examine that https://josauder.github.io/procedural_city_generation/#for analyzing how they find loop in a graph (not separated by other edges) it's python 2 and use certain version of some package that I'have installed for python 3, I worried any collision will happen And I'm following an AI course that give even more confusing instruction as I already have python and they mention "stuff" (free http://courses.nucl.ai/topic/pmgai-windows/) . I'm trying to follow that right now http://stackoverflow.com/questions/341184/can-i-install-python-3-x-and-2-x-on-the-same-computer
|
|
|
Logged
|
|
|
|
oahda
|
|
« Reply #4982 on: November 04, 2015, 12:34:42 PM » |
|
Why are multidimensional arrays in GLSL such an exclusive and recent feature and is there a more elegant way to emulate them than by using structs?
|
|
|
Logged
|
|
|
|
ThemsAllTook
|
|
« Reply #4983 on: November 04, 2015, 12:51:40 PM » |
|
Any single dimensional array in any language can be treated as multidimensional with some simple index arithmetic. Surely that's more elegant than using a struct.
|
|
|
Logged
|
|
|
|
oahda
|
|
« Reply #4984 on: November 04, 2015, 01:22:17 PM » |
|
True, but I don't like it.
|
|
|
Logged
|
|
|
|
ProgramGamer
|
|
« Reply #4985 on: November 04, 2015, 05:11:11 PM » |
|
I'm sure there's some macro/function shenanigans you can pull off to make it look better/more intuitive.
|
|
|
Logged
|
|
|
|
oahda
|
|
« Reply #4986 on: November 08, 2015, 11:23:55 AM » |
|
Been using what was suggested above today a few times after all. Not so bad after all, I guess.
Anyow, today's grumps:
I wanted to see if I could optimise the wave calculation part of my water shader. It recalculates the height of the wave at the current x position for every fragment, which is massively unnecessary since it ends up with the same value for every y since only the x position matters and not the y.
So I tried a bunch of ways to only calculate it for each x on the screen once. Uniforms wouldn't work. I need four values for each wave, and the driver simply wouldn't let me pass 1920 * 4 uniform values due to a limit of < 5000.
So I spent most of my day trying to pass it through a texture instead, writing my four values to the pixels. I ran into multiple problems.
First, I couldn't actually pass the right, arbitrary values because by default colour data gets clamped between 0 and 1. I eventually ended up solving this by finding a feature called something ARB which would allow me to pass any floats. A downside is that it's not as widely supported as other OpenGL features and I probably broke the game for a bunch of potential players by using it, tho it worked on my PC.
Second, my data wouldn't actually get passed to the shader. I thought there was something wrong with how I passed the pixel data to OpenGL and lots of stuff before finding out that the real problem was that one of the texture settings used something related to mipmaps by default in my texture class, and of course the texture I had just created by passing raw data didn't have any mipmaps. I removed this setting and suddenly it started working.
I think it actually worked fine, besides some weird bug that was probably somewhere in my wave code that I had translated from GLSL to C++, because the pixel data when I printed it to the console seemed to reflect the problem. But anyhow, it actually seemed to give worse performance in the end, and surely this stuff really is supposed to go on the GPU, so I dropped the idea.
Then, I tried to see if I could somehow restrict it to being done in the shader just once for every x. I tried declaring an array in the fragment shader and only updated it if gl_FragCoord.y was 0, but of course this didn't work since the variable doesn't remain persistent between fragments. The shared keyword didn't work. But I realised it was a bad idea anyway as I learned that (of course) the fragments are rendered in parallel and not one by one.
Lastly I tried putting it in the vertex shader by declaring the same array as an out variable and used it as an in variable in the fragment shader. This didn't work either, because the limit to varying variables was even lower than the one to uniforms.
So no solution so far. I mean, it crunches pretty well as it is and isn't slow (after all, if the y value is not within the range of the wave it just ignores the calculation completely for that fragment), but it'd be nice to see if I could decrease it. It just feels dirty to recalculate it so many times when it's not necessary.
|
|
« Last Edit: November 08, 2015, 11:30:24 AM by Prinsessa »
|
Logged
|
|
|
|
ThemsAllTook
|
|
« Reply #4987 on: November 08, 2015, 12:41:18 PM » |
|
A hybrid between your first two options might work. Render to a texture of the appropriate dimensions with a shader that computes one value per x position, then use the results in your main draw call. The overhead of multipass rendering might be more than any benefit you'd get from fewer calculations, though.
|
|
|
Logged
|
|
|
|
oahda
|
|
« Reply #4988 on: November 08, 2015, 12:45:03 PM » |
|
A hybrid between your first two options might work. Render to a texture of the appropriate dimensions with a shader that computefs one value per x position, then use the results in your main draw call. The overhead of multipass rendering might be more than any benefit you'd get from fewer calculations, though.
Oh, why didn't I think of that? I might try it, at least.
|
|
|
Logged
|
|
|
|
oahda
|
|
« Reply #4989 on: November 09, 2015, 04:42:17 AM » |
|
Tried it. Worse performance. Old code stays. But it was good learning experience anyhow — learned about geometry shaders so that I could render a texture without having any real geometry to give to the shader!
|
|
|
Logged
|
|
|
|
gimymblert
|
|
« Reply #4990 on: November 09, 2015, 02:00:13 PM » |
|
not enough grumpy in that post
|
|
|
Logged
|
|
|
|
|
ProgramGamer
|
|
« Reply #4992 on: November 14, 2015, 10:39:23 PM » |
|
Does anyone have a good NSIS documentation source, because I've been scouring the internet for one and can't find any kind.
|
|
|
Logged
|
|
|
|
Canned Turkey
Guest
|
|
« Reply #4993 on: November 14, 2015, 10:48:09 PM » |
|
I don't.
|
|
|
Logged
|
|
|
|
Garthy
|
|
« Reply #4994 on: November 14, 2015, 11:23:52 PM » |
|
Does anyone have a good NSIS documentation source, because I've been scouring the internet for one and can't find any kind.
I wrote a quick guide to NSIS. Here it is: 1. Use a generator to produce the basics. 2. Use it. 3. Hope like hell that you never, ever have to change anything. I don't know what it's like nowadays, but it was some scary stuff, and it was one of the few free options available at the time. I think there are a bundle of free options nowadays- I'd definitely suggest exploring and seeing what you can find.
|
|
|
Logged
|
|
|
|
Sik
|
|
« Reply #4995 on: November 15, 2015, 09:42:44 AM » |
|
Sounds like my issue with WiX... I mean there's WixEdit which is supposed to be awesome but for some reason it crashes here. Ended up learning the WiX XML the hard way (and just to make sure I wouldn't go crazy, I made a script to generate the whole thing for me - bonus because it can keep all files up to date without me explicitly changing the file list =D)
|
|
|
Logged
|
|
|
|
oahda
|
|
« Reply #4996 on: November 15, 2015, 05:09:55 PM » |
|
Never using git again.
Accidentally reverted to like a year old versions of the files in my project. Luckily only the game part (few files) and not the engine (many) and I was able to get the C++ files back thanks to OS X keeping backups, but apparently it didn't back up the script files which just got deleted...
But when I tried looking for lost script files through git in the terminal, it says it "exists on disk, but not in 'master'". I'm feeling a little hopeful here, but I can't actually find the file. What does git mean? Where on disk is it? Not even searching for it works. Is git just talking nonsense?
shitshitshitttttttttttttt
EDIT: YESSsssss. Found script files from only 3~4 days ago by exporting my last Xcode snapshot. ;;vv;;
EDIT: ... Except I'm getting really messed up errors now? Stuff displaying with the wrong size or colour........ WTH.
EDIT: Theeeere we go. Couple of textures and stuff had gotten reverted as well.
|
|
« Last Edit: November 15, 2015, 06:40:01 PM by Prinsessa »
|
Logged
|
|
|
|
ProgramGamer
|
|
« Reply #4997 on: November 15, 2015, 07:04:03 PM » |
|
|
|
|
Logged
|
|
|
|
oahda
|
|
« Reply #4998 on: November 15, 2015, 07:07:32 PM » |
|
I'm actually gonna try this again the next time I dare to, but not before I do an old-fashioned manual backup on an external hard drive. If I remember to actually commit more than once a year this sort of thing shouldn't be a panic situation...
It started with Git refusing to commit stuff because apparently it hadn't changed (I've been modifying it for months!) and also it appears not to be case-sensitive so that having renamed some files to start with upper case made a mess too. So I just wanted to try and push it to a different branch and then all hell broke loose...
I was just lucky that I had done a project-wide search and replace four days ago in Xcode because big operations like that automatically make snapshots get stored, and that OS X automatically backed up the C++ files (but not the script files for some reason...) ever since they were created so that there were loads of old versions to open up from the default text editor...
I really need to get Time Machine working.
But in good news, since I ended up not losing this progress, my game now runs really well thanks to the deferred rendering I've managed to implement in the last few days. Woop!
|
|
|
Logged
|
|
|
|
Dacke
|
|
« Reply #4999 on: November 15, 2015, 07:34:23 PM » |
|
commit more than once a year yah I don't see how you'd get any benefits from git unless you commit often. Preferable after every change (atomic commits) or at least every day, unless you're lazy and maybe skip a day sometimes. Which I now realize sounds like a "do lots of extra work, do it properly"-thing. But just being able to do a "git diff" to compare with my state yesterday saves my ass on a really regular basis. Like avoiding keeping temporary changes, reverting things that break, not worrying about doing crazy changes etc.
|
|
« Last Edit: November 15, 2015, 07:43:56 PM by Dacke »
|
Logged
|
programming • free software animal liberation • veganism anarcho-communism • intersectionality • feminism
|
|
|
|