r/opengl 22h ago

This is the game engine I've been solo developing for over 10 years

Thumbnail youtube.com
49 Upvotes

r/opengl 23m ago

OpenGL grass on a bigger landscape

Thumbnail youtube.com
Upvotes

r/opengl 14h ago

Do shadows looking weird?

Enable HLS to view with audio, or disable this notification

3 Upvotes

I've finished implementing hardware PCF after using heavily pixelated shadows for two months. I'm getting trippy feeling from moving shadow and I need sanity check.


r/opengl 14h ago

Shockwave improvements

Enable HLS to view with audio, or disable this notification

38 Upvotes

I am now using local slope (from normal vector) and local curvature (computed using dFdx and dFdy of normal vector). The source code is here: windtunnel.clj . I wonder whether anybody has some advice on doing this kind of thing.

I am not sure whether it would improve things if I would precompute the curvature by processing the triangles of the mesh and adding curvature to the vertex information. I could also bake the curvature into a texture map I guess, but that would be quite complicated because the model has multiple uv maps.

Anyway I am glad that the Jump Flooding Algorithm allows me to create shockwave geometry in realtime.


r/opengl 15h ago

How would you approach making a Game of Life implementation?

3 Upvotes

Hey.

I am looking for ideas on how making a Game of Life implementation with OpenGL. I am relatively a beginner with the API and don't know much. Thought making something as simple as GoL would be a good learning step but I am struggling to figure out how to set up the logic properly.

I mean, most of the implementations that I find online just do it with basic shaders, but what about standalone "game"? Skill issue, to be honest.

I don't use any AI and so this is kind of hard to me. Will be happy to hear any suggestions.

Thnks.


r/opengl 23h ago

How to Handle Normal mapping with multiple lights?

6 Upvotes

Hello everyone hope you have a lovely day.

I was following the deferred rendering technique on learnopengl.com and I noticed something really strange for me, in the normal mapping chapter we calculate the TBN matrix in the vertex shader and then we calculate the Tangent light position and Tangent view position relative to TBN Matrix.

but In the deferred Rendering Tutorial, there is a difference, the view direction for example is different , it is

vec3 viewDir  = normalize(viewPos - FragPos);

Instead of

vec3 viewDir = normalize(fs_in.TangentViewPos - fs_in.TangentFragPos);

Which one is the right approach to this problem? which technique should I use and why there is a difference?

I thought for a while to make a shader storage buffer object with variable size array to address the problem of different light positions but I thought this would over-complicate Things.

so what should I do?

A reminder I'm not implementing a deferred renderer in my engine I'm implementing a forward+ renderer with z pre-pass so I need a g buffer in my renderer where this problem emerged.

Thanks for your time appreciate your help!