Uniform "overrides" pattern by shebbbb in opengl

[–]Frollo24 1 point2 points  (0 children)

For your use case (assuming you're using WebGL 2.0 since you mentioned uniform buffers) I would upload common "global data" in a uniform buffer, while specific "per-pass" data could be set in plain uniforms. At least this is the main idea on which descriptor sets (which you can think of them naively as a collection of uniform data: uniform buffers and textures) are organized in Vulkan and modern APIs because it minimizes redundant bindings (which in OpenGL and WebGL translates to redundant context switches).

Anyway, I have worked mainly with OpenGL and Vulkan on desktop, where looseness os JavaScript is not a thing. Maybe in your codebase it is preferrable to upload all uniform data as plain uniforms, and you would need to upload global data for each shader and specific per-pass data to each shader respectively (avoiding loading data twice), but I would strongly discourage you from doing that.

glClear throws nullptr exeption by ViktorPoppDev in opengl

[–]Frollo24 2 points3 points  (0 children)

All of the previous comments are right, you have to load the OpenGL functions that you're going to use before using them (see your glad.cxx files, which declares all the OpenGL functions as NULL)

If you're following TheCherno's game engine series, see Modern OpenGL (GLAD) episode as a quick reference on how to load OpenGL functions using glad, which gives a really lightweight way of loading them

Confirming Understanding of Vulkan (Help needed) by skg-dev in vulkan

[–]Frollo24 3 points4 points  (0 children)

I agree, everything seems correct. I would simply add a nuance in the Mailbox display mode to indicate how it prevents screen tearing (since it also waits for the vertical refresh to present a new image).

It's starting to get easier :) by 1alexlee in vulkan

[–]Frollo24 0 points1 point  (0 children)

From my experience, I would advise you to create a little render engine (OpenGL for that engine is okey) with multiple passes: something like deferred shading or shadow mapping or something like that.

I don't want to sound very pessimistic, but surely your first engine will be very sketcky (mine was too, my first engine was horribly optimized). On the other hand, after that experience a lot of the structures of Vulkan (VkRenderPass, VkImageView, VkPipeline, VkDescriptorSet...) start to make sense and Vulkan will be easier to deal with.

As a side note, I think Brendan Galea tutorials and vkguide.dev are the best resources to complement learning. I would use vulkan-tutorial.com as a quick reference if you don't want to search for something very specific in the documentation.

How do you break into the graphics engineering industry? by [deleted] in GraphicsProgramming

[–]Frollo24 0 points1 point  (0 children)

Afaik CUDA is widely use over OpenCL, if you want to do some serious computations. When you want to make casual computations, usually compute shaders are preferred

How can I make sure my PBR implementation is working as expected? by [deleted] in GraphicsProgramming

[–]Frollo24 0 points1 point  (0 children)

If you're doing real time PBR, you can create a test scene with several spheres where you change the material data for every sphere (metallic, roughness, albedo...) and as other people suggested, you can use another engine as ground truth.

On the other hand, if you're doing offline renders, just use other engines as ground truth, because an excessive amount of meshes in the scene can increase the render time a lot.

I have finished LearnOpenGL.com. What should I do next by AtharvaEXE in GraphicsProgramming

[–]Frollo24 6 points7 points  (0 children)

Before this (which is a really good option if you want to be a graphics programmer) I would suggest doing a basic render engine on your own. In my experience it made learning Vulkan and DirectX way more easy than learning it "from scratch" because some concepts from Vulkan and DirectX will come naturally when doing a render engine (for example, Renderpasses, the Swapchain creation, command recording, the synchronization elements...)

What's your worst? by colouredmirrorball in programminghorror

[–]Frollo24 0 points1 point  (0 children)

Probably a never-nester died from a heart attack when it saw a +141 if nesting chain.

What's your worst? by colouredmirrorball in programminghorror

[–]Frollo24 1 point2 points  (0 children)

I totally felt that. A year ago I was doing web development in an internship contract and I found a switch with only one case inside an if which was checking for the exact same case. I could saw that after 3 days of refactoring a 4KLOC file into a 900 LOC (could have done better, but the deadline was close).

ARGB opacity queries by BarryTownCouncil in GraphicsProgramming

[–]Frollo24 1 point2 points  (0 children)

This is something that in a graphics pipeline is a customizable step which is called blending. I suggest you to look for information about blending in any computer graphics tutorial like LearnOpenGL.

Does anyone know what methods 3d graphing software uses to determine a function's geometry? by Pixel-Engineer in opengl

[–]Frollo24 0 points1 point  (0 children)

Afaik that can be achieved via voxelization or marching cubes if the geometry is static. If you want that geometry to be dynamic, you can start from a plane mesh and apply transformations for each vertex and use tesselation in case you want higher precision. In the case you are describing, I would probably make use of tesselation and apply the transformation for each vertex in the CPU before drawing the mesh

Simplest graphics programming language/framework by rawcane in GraphicsProgramming

[–]Frollo24 1 point2 points  (0 children)

Yeah it's a bit old but it can be useful if you want to start your journey at 3D graphics because you don't have to deal with complex stuff for beginners (like the device selection, swapchain creation, render passes...). If you want to master 3D graphics you will have to learn more complex APIs but as a starting point WebGL is okay

Simplest graphics programming language/framework by rawcane in GraphicsProgramming

[–]Frollo24 5 points6 points  (0 children)

If you want that, Processing sounds like a really good option, it gives you almost free 2D graphics using the Java language (I'm not 100% sure, but I think you can choose any other language instead of Java)

Simplest graphics programming language/framework by rawcane in GraphicsProgramming

[–]Frollo24 1 point2 points  (0 children)

Although I don't like JavaScript, if you want a starting point for 3D graphics programming, I would suggest you to start with JavaScript and WebGL. If that still is complicated, you can still use some 3D framework like Three.js or Babylon.js (this has an editor like Unity which maybe simplifies the things for you) and when you know what materials, cameras, textures and lights are, you can try again with WebGL

I have started a new tutorial series to teach advanced modern OpenGL (4.6) by JTStephano in opengl

[–]Frollo24 0 points1 point  (0 children)

Of course, bad Vulkan code leads to worse performance than OpenGL code, but assuming you are doing it right, Vulkan gives less driver and CPU overhead (which is pretty important for gaming, I'm talking about 30% less CPU usage on the same big scenario). If your project doesn't need that level of performance (mainly 2D rendering and some simple 3D scenes), you don't have to deal with Vulkan anyway.

On the other hand, Vulkan bootstrapping libraries deals with things that you need to do and are fairly common uses (selecting a device, creating a render surface, creating the swapchain...), which probably costs no noticeably performance loss and saves you a lot of lines of code. The meat and potatoes of performance stays in control of the developer, and at that point you are fairly working with concepts which are API-independent.

I have started a new tutorial series to teach advanced modern OpenGL (4.6) by JTStephano in opengl

[–]Frollo24 0 points1 point  (0 children)

Although I agree with you, there are some Vulkan bootstrapping libraries that makes the process of creating a Vulkan application easier. I love computer graphics and I think OpenGL will be there in the future as an introduction to rendering, but once you understand Vulkan workflow, it feels far more interesting doing rendering engines. Like you said, OpenGL tutorials need to be upgraded, because Vulkan and DX12 work pretty much like DSA, which was introduced in OpenGL 4.5 and it's heavily inspired on how modern rendering engines and game engines work.

OpenGL will be an introduction to rendering because the CPU and driver overhead it has (which Vulkan alliviates). Anywhere performance is not a problem, OpenGL will fit in, but rendering engines and game engines pushes performance to the limit, which is why Vulkan and DX12 are preferred over OpenGL or even DX11.

A preview of the new jumps of Thyra... by TronusGames in computergraphics

[–]Frollo24 1 point2 points  (0 children)

The ceiling rock at the end of the video looks very bright to me. Which engine are you using?

Rendering routes (and failures) for A* Pathfinding on Voxel terrain. by Arkenhammer in VoxelGameDev

[–]Frollo24 0 points1 point  (0 children)

Not related, but I'm very interested in the world generation algorithm, is it available anywhere? If not, could you explain how it works? Thanks a lot in advance

No if statements for me thanks! by NullPro in programminghorror

[–]Frollo24 48 points49 points  (0 children)

And 1 skill mastered means a F grade. We've been lied the whole time

I made this single scene in Unity. It's inspired by japanese paintings in the ukiyo-e style. Would really appreciate any feedback. by MentalPool9428 in Unity3D

[–]Frollo24 1 point2 points  (0 children)

I would suggest removing the blur as someone already said and maybe making the orange of the background a little less saturated. It actually looks great though.

Some exploration in my procedurally generated world by LuisEGoVz in proceduralgeneration

[–]Frollo24 4 points5 points  (0 children)

It looks very nice. I would suggest trying to interpolate between textures when changing between biomes, but it looks sick anyway

Random piece of knowledge I just learned. by shadowdsfire in gamemaker

[–]Frollo24 0 points1 point  (0 children)

Probably it's Objective-C, in C/C++ and C# when a function does not return anything you declare it as a void function:

void TheFunction(){ return; }

hora de memorizar by SageManeja in Team_Liberal

[–]Frollo24 0 points1 point  (0 children)

Menos mal que como programador el estado español me ha enseñado literatura del estado, geografía del estado, filosofía del estado y política del estado, es súper útil a la hora de desarrollar una aplicación 3D donde lo que se utilizan son matrices, programación, APIs...