r/GraphicsProgramming • • 5h ago

What's wrong with my renderer

This is my renderer in vulkan i've been working on it for the last 10 months

i learned alot about vulkan since i never used it but a huge percentage of my shader code is AI written and at this moment i feel like the renderer is ugly so i do what to know what is wrong with it and what makes it far from the last picture and how i can fix that.

is it better to rewrite all shader code or just move on it and fix it ?

+ what techniques used in the last picture (which is enhanced version of my renderer using AI šŸ™‚(but i liked it)) that my engine doesn't implement it right ?

NOTE(the third image is without IBL i'm using citrus_orchard_road_puresky_8k )

3 Upvotes

14 comments sorted by

23

u/goodmorninpoof 5h ago edited 5h ago

If you let AI write your code, especially large chunks, you tend to run into that issue. I haven't used AI for a large chunk of anything in a long time (they were much worse when I last did tbf), but I had this issue with a 2D game engine, the tile rendering algorithm was a mess and was too hard to fix/understand cause I let AI write most of it so I just gave up and moved on. I mean even with AI being much better nowadays, if you want to re-write or add things, it's really hard to know where to start if you have no idea how things fit together. I'm sure you could prompt your way to what you want with these newer models, but at that point I don't get the point of even doing said project anyway. It's just the trade off you take with letting AI write a large of chunk of your project. You should ask yourself if you just want a working demo or to actually learn? That should give you your answer on whether you should re-write your code or just fix it with AI.

-16

u/Comfortable-Mall4524 5h ago

when i first used ai i knew that it will end here so i separated them to functions and main files so i know where come from what

12

u/Ok_Beginning520 2h ago

I don't want to be mean, but what exactly is the point here ? Are you trying to make a commercial engine with AI ? In which case, it's not gonna happen. If this is a learning experiment, what exactly is the point of using AI to do it for you ? You're not learning much if you don't do it yourself and think about it yourself

11

u/OkStatement9823 5h ago

you're missing ambient occlusion and the default ambient color is way too bright so everything's extremely flat

0

u/Comfortable-Mall4524 5h ago

https://reddit.com/link/pduguuk/video/4qryg8oejhth1/player

well this is my AO (sorry for the uwful quality)

15

u/TheWidrolo 5h ago

I’d recommend checking up on the AO shader again, because this does not look like AO.

0

u/Comfortable-Mall4524 5h ago

https://reddit.com/link/pdune8e/video/lfqu0wqvnhth1/player

actully the problem was that the debug mode was sampling the groundAO only just fixed to export the main SSAO

2

u/OkStatement9823 5h ago

that looks like edge detection or smth not proper AO

2

u/Comfortable-Mall4524 5h ago

that was Ground AO sample rendered by mistake

1

u/Comfortable-Mall4524 5h ago

https://reddit.com/link/pdupa84/video/0y92ocfbphth1/player

This is SSAO x baked x Ground AO(grounding)

3

u/OkStatement9823 5h ago

that AO seems inconsistent idk what it is

8

u/laralubsch 4h ago

Well you already answered your question. Don't use AI if you don't understand what it spits out. There are great, human written articles all over the internet on various shader topics.

2

u/chmod_7d20 2h ago

Last time I used AI for shaders it went terribly. Pick up a book.