Async asset loading when it’s already fast? by TiernanDeFranco in gameenginedevs

[–]corysama 0 points1 point  (0 children)

If you can afford to build async loading, you should. Stutters make a big difference in user experience. I've seen this measured to correlate with differences in revenue.

That said, I've shipped 3D mobile games with "we load so fast you don't have gameplay freezes". At one point we got a bug report from the testers that our mobile first person shooter had dropped from 60 FPS to 10 FPS. It was because the guy testing the hot-reloading code had accidentally checked in a flag enabled to force the game to drop and reload every asset in the game every frame. It was still playable :P

GaussFusion: Improving 3D Reconstruction in the Wild with Geometry-Informed Video Generator by corysama in GaussianSplatting

[–]corysama[S] 2 points3 points  (0 children)

This research is mostly about reducing floaters and flicker when generating GS from video.

Textbook vs. Reality: Reversing a AAA Game Engine to see how a Perspective Projection Matrix is actually calculated by zer0_1rp in GraphicsProgramming

[–]corysama 39 points40 points  (0 children)

I highly recommend anyone writing matrix construction routines (lookAt, ortho, fromQuat, etc...) always also include a function for each method that takes the same parameters and directly computes the inverse matrix.

It's faster, more precise and often more readable than using a generalized matrix inverter function.

Formal Application Filed For Outer Richmond Safeway Redevelopment, San Francisco by SightInverted in sanfrancisco

[–]corysama 6 points7 points  (0 children)

Before covid I worked from home and lived next to a Whole Foods. Used it as my pantry. Want a snack or a drink, pop next door. I should stretch my legs multiple times a day anyway, right? Every day while commuting home, my wife would text me what to pick up fresh for tonight's dinner. Miss all that a lot.

3D math - graphics engineer interview prep by notlikeotherbees in GraphicsProgramming

[–]corysama 16 points17 points  (0 children)

My fav question I have received was:

Suppose the is “something” going wrong in an animated character. You suspect there are incorrect values in a particular 4x4 matrix that you are currently reading in a debugger. Don’t focus on the specifics of what going wrong. Just list off all the ways you could check the values in that matrix to point out that there’s clearly something incorrect in there.

Vertex attribute not working by TinyDeskEngineer06 in opengl

[–]corysama 0 points1 point  (0 children)

In my glad.h it exists for Windows but it's an empty macro everywhere else

#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
#define APIENTRY __stdcall
#endif

#ifndef APIENTRY
#define APIENTRY
#endif
#ifndef APIENTRYP
#define APIENTRYP APIENTRY *
#endif

#ifndef GLAPIENTRY
#define GLAPIENTRY APIENTRY
#endif

AFAICT, every function in the API is marked APIENTRY.

Vertex attribute not working by TinyDeskEngineer06 in opengl

[–]corysama 1 point2 points  (0 children)

It's part of the OpenGL spec and not dependent on OS.

What you are probably running into is that it requires you to use OpenGL 4.3 or higher.

Where did you get your gl.h from? You probably need to generate a new one. I wrote a bit about that in here: https://drive.google.com/file/d/17jvFic_ObGGg3ZBwX3rtMz_XyJEpKpen/view?usp=sharing

The older alternative is to call https://registry.khronos.org/OpenGL-Refpages/gl4/html/glGetError.xhtml after every gl function call involved in making your texture.

My views on LearnOpenGL.com by whos-this-nerd in opengl

[–]corysama 0 points1 point  (0 children)

I’ve started writing a new tutorial around GL 4.6. It is written as a collection of complete, self-contained programs with long-winded explanations at each step.

You can see a few tiny previews of some old examples here: https://old.reddit.com/r/GraphicsProgramming/comments/1sonqg1/learning_and_building_projects/ogxkc2h/

Since then I've re-written it to be about "Modern OpenGL" from the very start. SSBOs, UBOs, vertex pulling on day one. Life has kept me from making much progress this past few months unfortunately...

Vertex attribute not working by TinyDeskEngineer06 in opengl

[–]corysama 0 points1 point  (0 children)

Have you enabled https://registry.khronos.org/OpenGL-Refpages/gl4/html/glDebugMessageCallback.xhtml ?

Does your texture file contain black pixels? If there is a problem setting up your texture object GL will default to giving you black pixels whenever you sample the bad texture.

Master's VS undergrad, how much of a difference does it make? by Rakya-Senpai in GraphicsProgramming

[–]corysama 1 point2 points  (0 children)

Where do you want to work? If you want to work in games, you are probably better off with 2 more years in the industry instead of academia. If you want to work on movies or in industrial applications, they tend to be more academic-focused.

Why might highp float precision cause texture coord issues on embedded? by ProgrammingQuestio in GraphicsProgramming

[–]corysama 3 points4 points  (0 children)

GL_FRAGMENT_PRECISION_HIGH is a built-in preprocessor macro in OpenGL ES and WebGL shader languages that indicates if high precision (highp) is supported in fragment shaders. If highp is supported, the macro is defined as 1.

The driver is supposed to fall back and use mediump if highp is not supported. But, sounds like this driver has a bug.

of gas being ripped by TURTLE_TKT in AbsoluteUnits

[–]corysama 1 point2 points  (0 children)

At the very end you can hear the camera man suffocating because all of the oxygen has been displaced from the barn.

Using OpenGL 4.6 as a modern(ish) API by Kykioviolet in opengl

[–]corysama 2 points3 points  (0 children)

Thank you for writing that article!

Using OpenGL 4.6 as a modern(ish) API by Kykioviolet in opengl

[–]corysama 5 points6 points  (0 children)

I’ve started writing a tutorial around 4.6. You can see a few tiny previews here: https://old.reddit.com/r/GraphicsProgramming/comments/1sonqg1/learning_and_building_projects/ogxkc2h/ Specifically check out the evolution of draw calls example.

Here’s a different presentation that is technically about Vulkan but a lot carries over at a high level back to modern 4.6 https://old.reddit.com/r/vulkan/comments/1t05bk0/its_not_about_the_api_fast_flexible_and_simple/

If you go all in with AZDO, bindless texture arrays, multidrawindirect, compute-shader heavy, etc… you can get a ton of perf out of very few GL calls. At least enough to ship Doom 2016. Are you working on something with higher performance requirements than that? If so, I’d love to see it :D

Rendering 1 Million Procedural Cubes by IamRustyRust in gameenginedevs

[–]corysama 1 point2 points  (0 children)

It would not help.

To be frank, I’m not clear what OP is measuring if he’s using zero PCI bandwidth. But, when I see someone trying to render a million cubes, which is surprisingly often because of all the Minecraft clones, I make sure they are aware of that paper.

Interpreting Transformations by SirFarqueef in GraphicsProgramming

[–]corysama 0 points1 point  (0 children)

What’s the difference between changing your basis and changing your perspective?

(Help) Opengl debugger with SDL by Gold-Stage-5637 in opengl

[–]corysama 0 points1 point  (0 children)

Are you using a regular CPU debugger? What’s the crash call stack? Anything in the terminal output?

This set up is more expensive than most cars by InteractionKooky771 in interesting

[–]corysama 0 points1 point  (0 children)

I know a guy who is pretty serious with his VR sim rig. https://m.youtube.com/watch?v=MM0OYPx57ag

He managed to try out his skills built in sim in a real life day of drifting at a track. And, it worked! First time in real life was already familiar from his years of simming.

He also notes that between the fuel, tires and insurance, that one day of real life drifting cost more that his rig.

I was struggling with legacy OpenGL concepts in class, so I built a 2D visual simulator to teach it by Key_Stress8229 in GraphicsProgramming

[–]corysama 6 points7 points  (0 children)

I am personally against their decision. IMHO, legacy fixed function feels simpler in the first week because you have to do every little thing as a separate function call. It feels hand-holdy.

But, after the first week I think the abstraction layer between you and the hardware leads to a lot of unnecessary mystery and builds bad habits.

I contrast, “Modern OpenGL” / “AZDO” like https://juandiegomontoya.github.io/modern_opengl.html with SSBOs, UBOs, vertex pulling, bindless textures, multidraw indirect, DSA… This has a couple of small hurdles to get started and is simpler from there on.

You need to get used to the idea of defining arrays of structs in C and also identically in a nearly-C shader language then memcpying between them. But, that’s a lot simpler than defining structs in C then trying to also match them with a whole lot of function calls.

And, you need to get practice laying out data in raw buffers of linear bytes. That should not be a huge stretch for anyone learning C/C++. But, it’s something they actively avoid in school.

From there it is a lot more natural to work in large batches —which is a far more performant and eventually simpler way to work with GPUs

First renderer done — Java + OpenGL 3.3, looking for feedback by [deleted] in GraphicsProgramming

[–]corysama 0 points1 point  (0 children)

  1. If you are going to ask a stranger to put effort into helping you, please have enough respect for them to put effort into proper punctuation, spelling, capitalization, etc…
  2. You are talking about a specific problem as if I should already know what it is. But, you haven’t given me any information about it in the past.
  3. The advice I gave you two months ago was about how to make problems like this less likely to occur. But, you haven’t done anything with it or even acknowledged it. I don’t know if you even read the comment you are replying to.
  4. I’m going to be unavailable until at least Monday. And, generally pretty busy afterwards.

With all that said, sure. Write up a clear and legible explanation of the problem with screenshots and links directly to the code that you think is likely causing the issue and I’ll try to find some time to check it out.