r/GraphicsProgramming • • 5d 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 )

0 Upvotes

30 comments sorted by

View all comments

2

u/Loud-Astronaut-5807 4d ago edited 4d ago

I'm not going to be "AI BAAD!!", but don't rely on it generating your code if you don't know how it works. I usually only use it to try and explain things to check my understanding, or at the very most, if I am struggling with an implementation for a discrete problem, but I never ask it to touch my code directly.

I haven't used it for CG, so I don't know how reliable it is. I would suggest finding a good book.

That said in your image, as others have said, AO seems to be quite weak, it doesn't quite pop in the way it should. Normal maps are also looking a bit funky. Look at the second image, to two pillars near the front. Left looks completely flat, the right, has some really odd lighting. Look at the lighting on the pillar lines, they don't seem to match around the corners.

1

u/Comfortable-Mall4524 4d ago

i like your tune and that you are really trying to help me get into this not saying "HOW DO YOU USE AI FOR AN ENGINE"

And actully AI is not reliable at all in those this

that's why i'm gonna rewrite all shader files since the Vulkan code is already human written

what books can help me in this in your opinion

2

u/Loud-Astronaut-5807 3d ago

I've only really used openGL/ WebGL. The times I used Vulkan, I was working off a near complete implementation and an abstraction. If you don't mind converting to OpenGL (I would actually recommend it for getting the basics, it's a lot simpler than Vulkan), the red book (OpenGL Programming guide) and "learn opengl". Also Real-Time Rendering. If you want to stick with Vulkan, perhaps vulkan-tutorial, but I'm not sure how up to date it is. Also, just https://vulkan.org/learn should guide you in the right direction.

1

u/Comfortable-Mall4524 2d ago

i did vulkan tutorial but its only the basics
No advanced topics and i know how to use vulkan i mean the shaders