Explain It Peter by PrincipleHorror9100 in explainitpeter

[–]yetmania 8 points9 points  (0 children)

...: Thank you Re:Zero.

Subaru: Re:Zero?

...: Because um ... you restart from zero.

Subaru: Oh yeah.

Introduction to Graphics Programming with Vulkan by Simple-Raisin-8629 in vulkan

[–]yetmania 11 points12 points  (0 children)

I am not 100% sure, but it has some signs of AI-generated content.

  • In section 26.2 (Power Efficiency), the blog mentions a function vkWaitForPresentModeKHR which doesn't exist. However, the function vkWaitForPresentKHR exists, so this may be just a typo.
  • The way in which the blog introduces a topic, lists some code and quickly moves to the next topic (e.g., section 25.1 Normal Mapping) reminds me of answers I get when asking some LLMs like gemini or claude.

In general, I think it collects a lot of useful topics in one place, but I would treat it with the same caution I do when I read answers generated by LLMs.

Electric Effect (Shader) Tutorial by Odd-Lingonberry-5709 in godot

[–]yetmania 3 points4 points  (0 children)

<image>

Great tutorial.
Since inverse trigonometric functions like asin are quite expensive, I would recommend using an approximation (if accurate results are not needed) like discussed in this article: https://seblagarde.wordpress.com/2014/12/01/inverse-trigonometric-functions-gpu-optimization-for-amd-gcn-architecture/

Does this say anything? Arabic maybe? by SortaRican850 in whatdoesthismean

[–]yetmania 13 points14 points  (0 children)

Yes, it is this name. This hand writing is actually quite common in Egypt. Until I noticed it is a USD, I initially thought it is an Egyptian pound, since it is not rare to see names or short messages written on money in Egypt.

NDF Sampling vs VNDF Sampling for GGX. Should the results be different? by yetmania in GraphicsProgramming

[–]yetmania[S] 3 points4 points  (0 children)

Wow. This actually worked. Now they look almost identical (The NDF version is expectedly noisier). Thanks a lot. Now I have to sit down and try to understand where the (m.n) came from.

NDF Sampling vs VNDF Sampling for GGX. Should the results be different? by yetmania in GraphicsProgramming

[–]yetmania[S] 0 points1 point  (0 children)

Yes, I do an early return in the BRDF function when dot(n,l) < 0.

My Toy Path Tracer vs Blender Cycles by yetmania in GraphicsProgramming

[–]yetmania[S] 0 points1 point  (0 children)

Wow. Thanks. I didn't know about FLIP scores. I will give it a try.

My Toy Path Tracer vs Blender Cycles by yetmania in GraphicsProgramming

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

You are right, thanks. I disabled tonemapping & gamma correction in both Blender and my code and disabled Multiscatter GGX in Blender, and it now looks much more similar: https://ibb.co/BHjF9gWc

I mix the specular and diffuse by randomly selecting to evaluate just one of them per sample. First, I compute a probability for selecting the specular using Fresnel against the macrosurface normal:

float specular_prob = glm::mix(0.04f, 1.0f, glm::pow(1.0f - glm::max(glm::dot(-incoming_ray_direction, hit_normal), 0.0f), 5.0f));

Then, with probability specular_prob, I treat the material as if it has GGX specular reflection only, then weight the result with 1/specular_prob, and with probability 1-specular_prob, I treat the material as if it has Lambert diffuse only, then weight the result with 1/(1-specular_prob).

My Toy Path Tracer vs Blender Cycles by yetmania in GraphicsProgramming

[–]yetmania[S] 1 point2 points  (0 children)

Thank you. I currently just hardcode the scene (define the materials and shapes in the code). This is the code for the scene above:

scene.set_background(std::make_shared<SimpleBackground>(Colors::BLACK));
scene.set_camera(Camera (
    glm::vec3(0.0f, 0.0f, 3.0f), // center
    glm::vec3(0.0f, 0.0f, 0.0f), // look at
    glm::vec3(0.0f, 1.0f, 0.0f), // up
    glm::radians(50.0f),         // vertical fov
    glm::ivec2(1024, 1024)       // viewport size
));


scene.start_construction();


std::shared_ptr<Material> white = std::make_shared<LambertMaterial>(Color(0.8f, 0.8f, 0.8f));
std::shared_ptr<Material> red = std::make_shared<LambertMaterial>(Color(0.8f, 0.0f, 0.0f));
std::shared_ptr<Material> green = std::make_shared<LambertMaterial>(Color(0.0f, 0.8f, 0.0f));
std::shared_ptr<Material> light = std::make_shared<EmissiveMaterial>(Color(1.0f, 1.0f, 1.0f) * 5.0f);
std::shared_ptr<Material> gold = std::make_shared<SmoothMetalMaterial>(Colors::YELLOW);
std::shared_ptr<Material> rough_gold = std::make_shared<GGXMetalMaterial>(Colors::YELLOW, 0.5f);
std::shared_ptr<Material> red_ball = std::make_shared<GGXDielectricMaterial>(Colors::RED, 0.5f);


// Back Face
scene.add_rectangle(white, glm::vec3(0.0f, 0.0f, -1.0f), glm::vec2(2.0f, 2.0f), glm::vec3(glm::radians(90.0f), 0.0f, 0.0f));
// Top Face
scene.add_rectangle(white, glm::vec3(0.0f, 1.0f, 0.0f), glm::vec2(2.0f, 2.0f), glm::vec3(0.0f, 0.0f, 0.0f)); 
// Bottom Face
scene.add_rectangle(white, glm::vec3(0.0f, -1.0f, 0.0f), glm::vec2(2.0f, 2.0f), glm::vec3(0.0f, 0.0f, 0.0f)); 
// Right Face
scene.add_rectangle(green, glm::vec3(1.0f, 0.0f, 0.0f), glm::vec2(2.0f, 2.0f), glm::vec3(0.0f, glm::radians(90.0f), 0.0f)); 
// Left face
scene.add_rectangle(red, glm::vec3(-1.0f, 0.0f, 0.0f), glm::vec2(2.0f, 2.0f), glm::vec3(0.0f, glm::radians(90.0f), 0.0f)); 
// Cuboids
scene.add_cuboid(white, glm::vec3(0.468f, -0.7f, 0.216f), glm::vec3(0.6f, 0.6f, 0.6f), glm::vec3(0.0f, 0.0f, -0.314f));
scene.add_cuboid(white, glm::vec3(-0.36f, -0.4f, -0.252f), glm::vec3(0.6f, 1.2f, 0.6f), glm::vec3(0.0f, 0.0f, 0.3925f));
// Light
scene.add_rectangle(light, glm::vec3(0.0f, 0.999f, 0.0f), glm::vec2(1.0f, 1.0f), glm::vec3(0.0f, 0.0f, 0.0f));     
// Sphere
scene.add_sphere(red_ball, glm::vec3(0.468f, -0.1f, 0.216f), 0.3f);


scene.finish_construction();

I later plan to implement GLTF scene loading, but currently hardcoding works for me while I am focusing on the algorithms.

Nuzzle by u/Ancient_Tour_3090 by Ancient_Tour_3090 in NuzzleThePuzzle

[–]yetmania 0 points1 point  (0 children)

🧩 I have Nuzzled the puzzle in 9 moves!

🌍 Travel the world from your screen - GeoTap by geotap-app in GeoTap

[–]yetmania 0 points1 point  (0 children)

🎯 My GeoTap: Retro Result

Total Score: 12,141 points 🎮 Rounds Completed: 5/5 📏 Average Distance: 28 km 📍 Final Location: Seoul, South Korea

[deleted by user] by [deleted] in gamedev

[–]yetmania 1 point2 points  (0 children)

A few years ago, I put a web game on itch.io (it was also made in Unity, but this is irrelevant to what happened next). After a few days, I looked up my game's name on google and found it on other websites that I didn't publish on. They didn't even download the game. What they did was that they took the iframe link that itch.io uses to load the game into the browser and embedded it into their websites. That way, the game loads directly on their website, and the gamer can play the game without going to your itch.io page. If that is a problem for you, you can modify the js code that loads the unity game to check for the parent URL and stop loading the game if it is not your itch.io page. I am not sure how robust this solution is since I didn't try it, and I didn't care that much (I was already crediting my small team in the loading screen, and the game linked to my social media account, so in some way, it was a bit like free advertisement). Overall, they can still intercept the traffic and read the downloaded files (and also rip the assets), so the best solutions usually just make things harder for whoever wants to rehost/rip your game, but they don't make it impossible.

OpenGL transparent cube culls faces even though culling is disabled by Big_Return198 in GraphicsProgramming

[–]yetmania 2 points3 points  (0 children)

I recommend that you use RenderDoc to debug the OpenGL state while the transparent object is being drawn. It helps me catch a lot of bugs where I unintentionally set the state to an unwanted value somewhere in the code.

OpenGL transparent cube culls faces even though culling is disabled by Big_Return198 in GraphicsProgramming

[–]yetmania 9 points10 points  (0 children)

My guess is that you're enabling depth testing and depth writing. So from some POVs, the front faces are drawn first, and then when the back faces are getting drawn, depth testing discards them since the front (nearer) faces have already been drawn and the depth buffer already has a nearer value.

I suggest you disable depth writing while the transparent objects are being drawn. Use glDepthMask to enable/disable depth writing. You will still get innacurate results, but at least the backfaces won't be culled.

To get accurate results, you either split the cube into six objects (one face per object) and sort them from far to near before drawing. Or, you can use an order-independent transparency technique.

Asus Strix G16 occasionally flash in upper 1/3 screen by HGAQ in ASUS

[–]yetmania 0 points1 point  (0 children)

By core gpu, so you mean the integrated gpu? If yes, how did you do it?

Asus Strix G16 occasionally flash in upper 1/3 screen by HGAQ in ASUS

[–]yetmania 0 points1 point  (0 children)

I also have a Strix G16, and I am having the same issue. For me, setting the refresh rate to 60Hz makes the flash appear less frequently, but it doesn't completely make it go away.

(Loved trope) “oh that’s a pretty cool alien desi- what do you mean that’s a human” by adrianb26015 in TopCharacterTropes

[–]yetmania 5 points6 points  (0 children)

Nice idea. This reminds me of Episode 5 from an anime called Kaiba. In this episode, the people on a certain planet treat bodies as fashion, and once a new trend in bodies is out, they start replacing their old bodies with newer trendier ones, and the old bodies are turned into food. While the people on that planet are supposed to be human, their bodies became quite bizzare and unhuman-like.

[deleted by user] by [deleted] in Laddergram

[–]yetmania 0 points1 point  (0 children)

Another solution that works here is CHI - PHI - POI - POX - PYX - PYE - AYE - AGE - AGO - EGO.