ferreiradaselva
|
|
« Reply #5580 on: December 23, 2017, 05:59:59 AM » |
|
I think there's the Objective-C runtime API, that you can call the objective-c stuff from C/C++. Never used, but I eventually will.
|
|
|
Logged
|
|
|
|
ferreiradaselva
|
|
« Reply #5581 on: December 23, 2017, 09:03:24 AM » |
|
The worst bugs are the most obvious ones.
I made a big update on my framework 3-4 days ago. It was a big update, but everything should go smoothly. Then, nothing shows one the screen. It could be a million things (wrong vertex attrib configuration, wrong shader creation, wrong texture creation). 2 days searching for the problem.
The cause of the problem? Y coordinates of texture is inverted in PNG and I forgot that, so the quads were drawing a transparent region of my texture.
|
|
|
Logged
|
|
|
|
JWki
|
|
« Reply #5582 on: December 24, 2017, 12:58:40 AM » |
|
I think there's the Objective-C runtime API, that you can call the objective-c stuff from C/C++. Never used, but I eventually will.
Yep it's all objective c.
|
|
|
Logged
|
|
|
|
Maximillian
|
|
« Reply #5583 on: December 24, 2017, 01:39:56 AM » |
|
Thanks for the link. That's a great lesson.
|
|
|
Logged
|
|
|
|
ferreiradaselva
|
|
« Reply #5584 on: December 24, 2017, 07:35:48 AM » |
|
I think there's the Objective-C runtime API, that you can call the objective-c stuff from C/C++. Never used, but I eventually will.
Yep it's all objective c. This is what I mean: https://stackoverflow.com/a/5901766
|
|
|
Logged
|
|
|
|
gimymblert
|
|
« Reply #5585 on: January 27, 2018, 05:21:58 AM » |
|
|
|
|
Logged
|
|
|
|
ThemsAllTook
|
|
« Reply #5586 on: February 03, 2018, 08:06:31 PM » |
|
This is more of a whew-I-solved-it post than a grumpy post, but I think it fits better here than in the happy room...
I had just set up a system that would allow my Blender exporter script to merge a model's bump and normal maps into a single combined normal texture. Great! But then I started noticing that my normal maps weren't quite rendering right... Some features that were supposed to be indented were protruding, and vice versa. It looked like it wouldn't be as simple as inverting the entire thing, since some sections were right but others weren't.
I tore apart my shader, normal map generator, and other parts of my code trying to understand what was going on. Eventually I tried reimporting the combined normal map into Blender, and it showed the same behavior as my own renderer. I determined that the problem areas had something to do with the orientation of the UV map in that spot; if I'd rotate the UV coordinates, it would make it worse or better. For a little while, I thought I just fundamentally didn't understand how normal mapping worked, and I'd have to somehow orient my map texture based on the UV coordinates that referenced it. Scary!
Also, Blender is really picky about baking normal maps. I had to do a bunch of troubleshooting and learn a weird dance that's sometimes necessary to get it to actually bake what I requested.
Finally, when I got Blender to behave and bake me a clean test normal map that I could compare against what I had generated, I was able to spot the problem - the helper utility I'd written that my exporter script uses to merge the normal and bump maps was referencing the images upside down. Blender and my renderer expected a y-up coordinate system, but I was just doing basic image manipulation, which is typically y-down. I flipped my bump-to-normal calculation on the y axis, and everything was fixed. Phew! Crisis averted. I wish I'd been able to figure that out without having to tear apart my entire system to find the problem.
|
|
|
Logged
|
|
|
|
|
gimymblert
|
|
« Reply #5588 on: February 07, 2018, 12:52:00 PM » |
|
|
|
|
Logged
|
|
|
|
ProgramGamer
|
|
« Reply #5589 on: February 07, 2018, 01:12:19 PM » |
|
Hey, at least everyone agrees on counter-clockwise triangles
|
|
|
Logged
|
|
|
|
gimymblert
|
|
« Reply #5590 on: February 07, 2018, 04:14:42 PM » |
|
I still hate programming, what I hate is prototyping and having to constantly refactor and renaming as you realize your real need, and the need to keep track of all dependency, and even though it's a prototype, you still need to pay attention to technical debt to not be stopped right in your thinking, damn busy works!, it's literally building the car while driving it
|
|
|
Logged
|
|
|
|
ProgramGamer
|
|
« Reply #5591 on: February 07, 2018, 05:13:55 PM » |
|
I mean, refactoring is kinda par for the course if you're gonna make anything non-trivial. It's kind of the nature of programming. As you come up with your program, your understanding of the problem you're trying to solve evolves. That's what makes it enjoyable imho.
|
|
|
Logged
|
|
|
|
|
ProgramGamer
|
|
« Reply #5593 on: February 08, 2018, 07:40:50 AM » |
|
Fair, and the joy of making stuff happens is also something that I deeply enjoy, but then I'm also a nerd who just enjoys the semantics of how programming languages work, so refactoring is this weird calm thing that I strangely still like doing. I guess I'd compare it to how some people enjoy grinding in RPGs.
|
|
|
Logged
|
|
|
|
Crimsontide
|
|
« Reply #5594 on: February 08, 2018, 11:59:24 AM » |
|
Fair, and the joy of making stuff happens is also something that I deeply enjoy, but then I'm also a nerd who just enjoys the semantics of how programming languages work, so refactoring is this weird calm thing that I strangely still like doing. I guess I'd compare it to how some people enjoy grinding in RPGs.
Ya I like refactoring as well. I find it relaxing, sort of like putting a final coat of paint. Once its working I can 'prettify' and optimize it and I really enjoy that part.
|
|
|
Logged
|
|
|
|
Maximillian
|
|
« Reply #5595 on: February 09, 2018, 04:00:46 AM » |
|
I frequently lose interest in programming. It's not really something I enjoy to its fullest. I am more attracted to things more abstract. A.I. might be the only thing that keeps my interest for a little bit longer but even then I only enjoy it because it involves studying what intelligence is.
|
|
|
Logged
|
|
|
|
gimymblert
|
|
« Reply #5596 on: February 09, 2018, 08:01:52 PM » |
|
My planet code is almost complete for the fundamentals, yet it send a last "fuck you" bug to make me rage all days and night, I have been staring the screen blank so much my eyes are actually bleeding red ... the logic should work WTF
|
|
|
Logged
|
|
|
|
gimymblert
|
|
« Reply #5597 on: March 09, 2018, 06:00:48 AM » |
|
|
|
« Last Edit: March 09, 2018, 06:14:05 AM by gimymblert »
|
Logged
|
|
|
|
qMopey
|
|
« Reply #5598 on: March 09, 2018, 10:48:20 AM » |
|
I have no idea what I'm looking at, but I do like it.
|
|
|
Logged
|
|
|
|
gimymblert
|
|
« Reply #5599 on: March 09, 2018, 11:29:32 PM » |
|
Following this tut: http://lodev.org/cgtutor/raycasting.html#IntroductionLeft part is a top down view, right is first person, oval blob is wall hit to sample. But the delta for ray interpolation is in the form of 1/x, it means that it oversample the middle and undersample the side, and the weird ray that is on the side and do not sample the correct wall color is the singularity.
|
|
|
Logged
|
|
|
|
|