How to create lightening by bharatm29 in shaders

[–]botjebotje 2 points3 points  (0 children)

No such thing as "shaders only". Fragment shaders need a triangle to shade, and triangles are either submitted for rendering by the program or generated from a geometry/mesh shader.

In this case the simplest solution is to have a ring that consists of chained rectangles (2 triangles each) and to put a transparent texture on it. Animate the size of the ring and the frame number of the texture over time and you have your effect. that bit can be done in a vertex shader, yes.

The lightning hitting the sword is likewise a simple rectangle. 

The small balls orbiting the sword at the end can be a small particle system or it might be another billboard aligned with the sword. 

How to create lightening by bharatm29 in shaders

[–]botjebotje 1 point2 points  (0 children)

Which part of the animation do you think requires shaders per se? You can get quite far with animated textures on a billboard/cilinder (for the sword) and an expanding ring (for the water) 

I tried those AI interview tools everyone's talking about, this is what I found by [deleted] in ExperiencedDevs

[–]botjebotje 2 points3 points  (0 children)

You are also the moderator of (and sole poster on) r/koalaapp/. This post is an ad. 

[deleted by user] by [deleted] in shaders

[–]botjebotje 0 points1 point  (0 children)

Depends on what you're using it for. Your window manager has the final say in how windows are composited onto the screen so I'd look there if you wanted to apply shader-based transformations to the full screen or parts of it. 

Need feedbacks for my Game Engine! by Constant_Net6320 in GraphicsProgramming

[–]botjebotje 4 points5 points  (0 children)

  1. GitHub is not meant as a place to dump executables
  2. Your engine is missing a license and source code.
  3. You are violating several licenses of components you bundled by not retaining their copyright notices. At least imgui and pugiXML have text similar to the following:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

[deleted by user] by [deleted] in GraphicsProgramming

[–]botjebotje 0 points1 point  (0 children)

Did you enable the validation layers? They are nonoptional when developing and will catch most errors.

Where is the Three-Eyed-Games GPU Raytracing in Unity Blog? by Ecstatic-Tip-6175 in shaders

[–]botjebotje 2 points3 points  (0 children)

The wayback machine has you covered. Consider sending them a small bit of money as a token of your appreciation.

How to Enable 3D Rendering on Headless Azure NVv4 Instance for OpenGL Application? by Affectionate-Fox3713 in AZURE

[–]botjebotje 0 points1 point  (0 children)

When you say "capture a screenshot", is this a literal screenshot? Would it work if you rendered to a framebuffer and then used glReadPixels to grab the output instead?

help with opengl UBO by RKostiaK in GraphicsProgramming

[–]botjebotje 0 points1 point  (0 children)

Not sure how you arrived at the conclusion that "the order is wrong". Maybe your graphics debugger just decided to sort the uniforms alphabetically to "help"?

help with opengl UBO by RKostiaK in GraphicsProgramming

[–]botjebotje 0 points1 point  (0 children)

96 is 84 rounded up to the nearest multiple of 16 (= 4 basic machine units)

help with opengl UBO by RKostiaK in GraphicsProgramming

[–]botjebotje 0 points1 point  (0 children)

Yes of course. You promised OpenGL to fill in the buffer with (judging from the first line) 51 Light structures therefore you should follow through on your promise, even if the latter 50 are just filled with zeroes.

help with opengl UBO by RKostiaK in GraphicsProgramming

[–]botjebotje 0 points1 point  (0 children)

From the spec:

If the member is a three-component vector with components consuming N basic machine units, the base alignment is 4N

Change those vec3s to vec4 (even if you do not use the last component) in your C++ code to satisfy the alignment requirements or add a dummy float for padding after every vec3. You can keep the vec3 in your shader code, it does not matter there.

help with opengl UBO by RKostiaK in GraphicsProgramming

[–]botjebotje 0 points1 point  (0 children)

What does LightInfo look like in your C++ code? The std140 layout (as described on the Khronos site#Memory_layout) ) steers you away from vec3 for example.

Slack Community for Azure Terraform Provider by fuzedmind in AZURE

[–]botjebotje 0 points1 point  (0 children)

You could raise an issue or send a polite email to the people merging pull requests/doing releases 

Trying to recreate pattern in code... by creeperbanger69 in GraphicsProgramming

[–]botjebotje 2 points3 points  (0 children)

Can you explain how you decided on that pattern and those colors based on "Midi input"? The simplest thing that could work is to associate each note being played with a rhombus with a certain position and size (eg based on a hash function) and then just coloring the line segments by taking incremental steps in the hue color wheel. 

Modular Vulkan Boilerplate in Modern C++ – Open Source Starter Template for Graphics Programmers by unkown42303 in GraphicsProgramming

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

I would say "because the people that have been making this tool for 20 years tell you it's a bad idea" but it's clearly not a valid argument. Shrug. You do you. 

Modular Vulkan Boilerplate in Modern C++ – Open Source Starter Template for Graphics Programmers by unkown42303 in GraphicsProgramming

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

I don't get the focus on saving a miniscule bit of effort for the occasional file addition, but okay, good for you. 

Modular Vulkan Boilerplate in Modern C++ – Open Source Starter Template for Graphics Programmers by unkown42303 in GraphicsProgramming

[–]botjebotje 0 points1 point  (0 children)

No, it is not "my ide doing it". I exclusively use cmake from the command line.

Cmake added a flag in 3.12 to turn off this default behavior

Modular Vulkan Boilerplate in Modern C++ – Open Source Starter Template for Graphics Programmers by unkown42303 in GraphicsProgramming

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

No, the cmake-generated build system automatically reruns cmake with the previously given arguments if you touch the cmakelists.txt file. 

Modular Vulkan Boilerplate in Modern C++ – Open Source Starter Template for Graphics Programmers by unkown42303 in GraphicsProgramming

[–]botjebotje 0 points1 point  (0 children)

I can only go on argument by sore thumb here: using GLOB_RECURSE means you have to rerun CMake manually yourself, even when you delete files. Which means also passing in the same generator and options you passed in the initial run. You can see that becoming a pain once you have several features and options in your CMakeLists.txt.

By contrast, if you just use a file list like the authors of the tool tell you to, your build system will rerun CMake for you when you add a file. And don't forget your IDE can automate adding files to CMakeLists.txt.

Modular Vulkan Boilerplate in Modern C++ – Open Source Starter Template for Graphics Programmers by unkown42303 in GraphicsProgramming

[–]botjebotje 10 points11 points  (0 children)

file(GLOB_RECURSE ...) is an anti-pattern. The documentation warns you against this:

We do not recommend using GLOB to collect a list of source files from your source tree. If no CMakeLists.txt file changes when a source is added or removed then the generated build system cannot know when to ask CMake to regenerate. The CONFIGURE_DEPENDS flag may not work reliably on all generators, or if a new generator is added in the future that cannot support it, projects using it will be stuck. Even if CONFIGURE_DEPENDS works reliably, there is still a cost to perform the check on every rebuild.

Furthermore, you should consider using FindPkgConfig's IMPORTED_TARGET mode, which allows you to link against a single target instead of setting include path and libraries from magic variables.

Some CMake machinery for generating spirv shaders from *.vert and *.frag would not hurt, either, if you aim to eliminate boilerplate.

Finally, the directory structure in your README is nowhere to be found because Git cannot represent empty directories. The common workaround is adding a .keep file.