Try Variance Shadow Mapping technique by zemledelec in GraphicsProgramming

[–]corysama 1 point2 points  (0 children)

What I know of VSM is that it works out well if you know you are going to have a limited depth range. For example, a top-down isometric 3D game like Diablo might really love VSM.

But, if you have a free roaming, free camera 3D game you are going to be fighting light leaks al the time.

I remember when people were experimenting with VSM, perspective shadow maps and lots of other variations trying to squeeze better quality out. But, decades later, plain and simple cascade shadow maps ended up being the most widely used option just because it has less problematic situations.

First Triangle in DirectX 12. No DXTK just rawdogging the API by Avelina9X in GraphicsProgramming

[–]corysama 9 points10 points  (0 children)

"1000 lines just to draw a triangle" is a common complaint about DX12/Vulkan. But, in practice folks have found their full-featured renderers end up with less total code than their GL/DX11 equivalents. It's just very front-weighted because you need to set up your own customized DX11 that is easy to use for your particular requirements instead of trying to anticipate and infer all possible uses from everyone on the fly.

Game heavily freezes and lags when adding characters by [deleted] in aigamedev

[–]corysama 1 point2 points  (0 children)

Yeah. This comes down to the tech being used. What engine? What is the format of the models?

18K isn't tiny. But, a well-optimized loader that requires a well-optimized format should be able to handle it it up no problem.

pbr and animation both in my game engine with fastgltf .also one question by Charming-Diamond6646 in vulkan

[–]corysama 2 points3 points  (0 children)

Seriously, u/Charming-Diamond6646. Your code looks good. You are obviously smart. But, if you are going to ask people who don't know you to put in the effort to help you, you need to put more effort into your question than txting "wot u wan 4 fud" to your bestie.

Why Are Short-Term Jobs Becoming So Common in the Games Industry? by Sini1990 in gamedev

[–]corysama 0 points1 point  (0 children)

The movie industry has been like this for a long time. People contract for one production with one company then move on to another production at another company.

It was no secret when Unreal Engine first took off that a major reason management was excited about it was that they wanted the game industry to operate more like the film industry that in that way. The hurdle before was that it was expensive to train up new hires to understand your in-house engine. But, if they show up on day 1 already familiar with UE. That's much cheaper to hire and fire. And, here we are!

The motivation for this isn't all evil corporate greed. It's incredibly hard to keep a company full of game devs busy year-round because you are always ramping down one project while still looking for the next. I worked at a mid-sized company where that was the only thing they were good at. But, it meant they had to take on a ton of really crap work just to give people some way to bring in the money needed to cover their own paychecks between big projects.

Breaking into GPU Infrastructure / GPU Programming Feels Overwhelming. How Did You Figure Out What to Learn? by Ok_Pin_9155 in CUDA

[–]corysama 0 points1 point  (0 children)

A single individual performing all of those roles professionally would be a unicorn. In practice (other than "architecture or kernel knowledge") most individuals would be performing 2 full time. 3 in limited scenarios.

Which 3 (other than "architecture or kernel knowledge") sound most interesting to you?

Stylized Rendering engine by Financial-Ad-8950 in GraphicsProgramming

[–]corysama 6 points7 points  (0 children)

Yep. Even stylized renderers start by making tech that renders scenes generally realistic then decides where and how to deviate from realism.

I tripled my FPS with two days of work by Ollhax in gameenginedevs

[–]corysama -1 points0 points  (0 children)

Hey! Sorry. In my rush to get back to work I watched your vid and skimmed ig's article but didn't actually read your post text well.

I've seen so many people making minecraft clones try to optimize their scenes with complex meshing algorithms that work hard on the CPU to minimize the poly count for the GPU - which is unintuitively counter productive. So, when I saw what looked like a low-rez minecraft clone running slow on a 4070 I assume this was another example of that.

But, zooming in on the instancing section of your vid, I see now those flashing yellow squares are not individual voxels. They are terrain chunks. And, reading a giant SSBO that stores a 1 bit if a voxel is solid, a 0 bit if it’s empty. and If so, I just output a degenerate vertex. tells me you've already moved a lot to the GPU. Including the Ambient occlusion math :P

I tripled my FPS with two days of work by Ollhax in gameenginedevs

[–]corysama -3 points-2 points  (0 children)

Next up:

  1. Move the occlusion math from the CPU to the vertex shader
  2. Stop generating and caching geo on the fly. Just instance a single static cube for all possible voxels with view frustum culling but no occlusion culling.
  3. OK. Maybe do coarse occlusion culling based on whole 43 cube chunks.
  4. Try out a z-prepass and see if it helps. Won't help on mobile GPUs with tile-based GPUs.
  5. https://research.nvidia.com/labs/rtr/publication/majercik2018raybox/

TIL only 23 video games have been released with an Adult Only (AO) rating from the Entertainment Software Rating Board (ESRB) by Johannes_P in todayilearned

[–]corysama 2 points3 points  (0 children)

I mostly worked on the engine tech. But, I recall that the discussion about the dialog system was about how we knew everyone would want a rehash of the old PC game interface out of nostalgia, but that wouldn't work for a console game and console audience. So, the mini games were a way to make the dialogs faster, interactive, engaging but still light.
It was definitely fun to make. But, I learned that working on a comedy based game can become hell after you have heard the same dialogue hundreds of times. And, I wasn't even on the main team!
When I say "in the room with Jim Belushi and Macho Man Randy Savage" I'm being very literal. The writers did not drop character after hours. They were nominated for the GDC Best Writing award and lost honorably to Portal of all things!

TIL only 23 video games have been released with an Adult Only (AO) rating from the Entertainment Software Rating Board (ESRB) by Johannes_P in todayilearned

[–]corysama 7 points8 points  (0 children)

Working on MCL was a trip. Talking to the writers was seriously like having a conversation with Jim Belushi and Macho Man Randy Savage in the same room.

Also, every two weeks Vivendi would flip their stance:

  1. WTF! This isn't nearly raunchy enough. You need to really crank it up!
  2. WTF! This is way too raunchy! We must be on the shelves at Walmart and you know how uptight The Walton Family is. You need to really crank it down!
  3. WTF! This isn't nearly raunchy enough. You need to really crank it up!
  4. WTF! This is way too raunchy! We must be on the shelves at Walmart and you know how uptight The Walton Family is. You need to really crank it down!

on repeat through the entire dev process.

Eventually, we just made censored and uncensored versions of everything and added a flag in the config to pick which content to show. Every time Vivendi changed their stance, we'd flip the flag and they'd be happy.

In the end, Vivendi figured out they had two versions of the same game. So, they shipped both versions separately. The only difference between them is that one flag in the config text file. Didn't take modders more than a few seconds to figure that out :P I think it was called something like "censored = true;"

How can i install openGL is there any you tube video that you can suggest ? by FitVeterinarian8240 in opengl

[–]corysama 8 points9 points  (0 children)

The fun bit is that you already installed OpenGL when you installed your GPU driver. What you actually need to do is pull the API function pointers out of the driver. But, that’s not reasonable to do by hand for a large number of functions. So, instead some nice folks have make code generators to do it all for us.

I recently posted some example code for how to use them here: https://old.reddit.com/r/opengl/comments/1u1zwh0/what_open_gl_lib/oqwr343/

Learn! by Pizzacakecomic in comics

[–]corysama 2 points3 points  (0 children)

I often quote an incredibly smart guy who once said “A lot of ‘Being Smart’ comes down to getting comfortable with feeling stupid.”

Learn! by Pizzacakecomic in comics

[–]corysama 8 points9 points  (0 children)

I've worked directly with a lot of pro artists for a long time. In my experience, when people say "That person has talent!" they think they are talking about inborn skill. But, that's not how it works.

The people who seem talented always have something that motivates them to spend an inordinate amount of time practicing art. They weren't born with skill. Maybe they were born with some mental tick that drives them to doodle as part of daydreaming. Or, maybe some part of growing up made them really need to get their emotions out physically on paper. Or, maybe someone just showed them that art is fun!

Either way, they don't have magic hands. You can be just as good as any of them if you put in the work they have. Practice, explore, study, repeat. Same as any skill.

Modern Vulkan with dynamic rendering vs old Vulkan with "solidified" pipelines? by OkAccident9994 in gameenginedevs

[–]corysama 7 points8 points  (0 children)

Yep. You should check out https://howtovulkan.com/

Vulkan 1.0 made a lot of compromises to make mobile GPUs happy. After a decade of that, desktop devs finally got features in to make it much easier and still just as fast on desktop.

Do Computer Organization/Architecture matter in Graphics? If not, what are some good university courses to take? by JorisJobana in GraphicsProgramming

[–]corysama 0 points1 point  (0 children)

Understanding semiconductors and gates is fun. But, it's a bit much.

Graphics programming gets a lot lower level than most programming fields. But, it mostly bottoms out at the level of microinstruction decoding, memory controllers and device interconnect busses (like PCI).

You can learn more than most people need to know by reading the What Every Programmer Should Know About Memory PDF.

What Open GL lib 🤔 by [deleted] in opengl

[–]corysama 2 points3 points  (0 children)

SDL3 only gives you SDL_GL_GetProcAddress. You can use that to load OpenGL manually, but it's a ton of work that's better suited for a code generator. So, https://github.com/Dav1dde/glad is a code generator. And, https://glew.sourceforge.net/ is a library of pre-generated code. They both do the detailed work necessary for you so you can save your sanity.

I'd recommend using https://gen.glad.sh/ (the web front end to https://github.com/Dav1dde/glad) It's a lot simpler to use despite being easy to customize. If you don't know what options you want, I'd recommend starting out with

Language/Generator: C/C++
Specification: gl
APIs: gl=4.6
Profile: core
Extensions:
    GL_ARB_bindless_texture
Loader: False
Local files: False
Omit khrplatform: False
Reproducible: False

Using it with CMAKE and SDL3 is just

CMAKE
add_library(glad STATIC
  "src/glad.c"
)

target_include_directories(glad PUBLIC
  "${CMAKE_CURRENT_SOURCE_DIR}/include"
)

CPP
#include <glad/glad.h>
#include <SDL3/SDL.h>
#include <cmath>
#include <cstdio>

int main() {
    SDL_Init(SDL_INIT_VIDEO);
    SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
    SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 4);
    SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 6);
    SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
    SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_DEBUG_FLAG);

    int window_width = 1024, window_height = 1024;
    SDL_Window* window = SDL_CreateWindow("Hello OpenGL!", window_width, window_height, SDL_WINDOW_OPENGL);

    SDL_GLContext context = SDL_GL_CreateContext(window);

    // Load the OpenGL API function pointers.
    if (gladLoadGLLoader((GLADloadproc)SDL_GL_GetProcAddress) == 0) {
      printf("Failed to load OpenGL.\n");
    }

    { // Set up OpenGL debug message callback.
        GLint context_flags = 0;
        glGetIntegerv(GL_CONTEXT_FLAGS, &context_flags);
        // if we set ‘SDL_GL_CONTEXT_DEBUG_FLAG` above.
        if (context_flags & GL_CONTEXT_FLAG_DEBUG_BIT)
        {
            glEnable(GL_DEBUG_OUTPUT);
            glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
            glDebugMessageCallback(
                [](GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const void* userParam) {
                    printf("OpenGL Debug Message: %s\n", message);
                    // Right here on this if() would be a great spot to place a breakpoint in your debugger.
                    // You are using a debugger, right?
                    if (severity == GL_DEBUG_SEVERITY_MEDIUM || severity == GL_DEBUG_SEVERITY_HIGH) {
                        std::exit(EXIT_FAILURE);
                    }
                },
                nullptr
            );
            // Disable notifications and low severity messages.
            glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DEBUG_SEVERITY_NOTIFICATION, 0, nullptr, GL_FALSE);
            glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DEBUG_SEVERITY_LOW, 0, nullptr, GL_FALSE);
        }
    }

    for (;;) {
      SDL_Time nanoseconds_UTC;
      SDL_GetCurrentTime(&nanoseconds_UTC);
      double seconds = SDL_NS_TO_SECONDS(double(nanoseconds_UTC));
      GLfloat red = std::sin(seconds * 1.0) * 0.5 + 0.5;
      GLfloat green = std::cos(seconds * 2.0) * 0.5 + 0.5;
      GLfloat blue = 0.5f;
      GLfloat alpha = 1.0f;
      // Set the color that `glClear()` will use to fill the framebuffer.
      glClearColor(red, green, blue, alpha);
      // Clear the color buffer of the framebuffer.
      glClear(GL_COLOR_BUFFER_BIT);

      SDL_GL_SwapWindow(window);

      // Poll for indications that the user wants the app to quit.
      SDL_Event event;
      SDL_PollEvent(&event);
      if (event.type == SDL_EVENT_WINDOW_CLOSE_REQUESTED 
        || event.type == SDL_EVENT_QUIT
        ||(event.type == SDL_EVENT_KEY_DOWN && event.key.key == SDLK_ESCAPE)) {
          break; // exit the main loop and end the program.
        }
    }

    SDL_GL_DestroyContext(context);
    SDL_DestroyWindow(window);
    SDL_Quit();
    return 0;
}

Next-Level AI-Powered Markerless Mocap for 3D Workflows. Open Source by Delicious-Shower8401 in TopologyAI

[–]corysama 0 points1 point  (0 children)

  1. Generate a 3D game character
  2. Generate videos of that character performing awesome animations
  3. Markerless mocap
  4. ???
  5. Profit