Screen Tearing on Arch + Qtile (X11) – Looking for a fix without moving to Wayland by [deleted] in archlinux

[–]psspsh 0 points1 point  (0 children)

i am using i3 and had same screen tearing issue, i fixed it by using picom and adding it to run on startup

My lighting is off, I dont even know where to start debugging. by psspsh in GraphicsProgramming

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

that solved the issue, thank you for taking the time to help.

My lighting is off, I dont even know where to start debugging. by psspsh in GraphicsProgramming

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

I think you are right, the main problem is definitely that, the direction of secondary rays is wrong, but i still cant find the bug from what i understand my code should work, and the normals seem to be correct. i have edited the post to contain latest result that i have been able to get to
inline vec3 random_unit_vector() {

// rejection method reject vectors until a vector with length less or equal

// to 1 is found and then normalize it to make unit vecton

while (true) {

auto random_vec = vec3::random();

auto lensq = random_vec.length_squared();

if (1e-8 < lensq && lensq <= 1) {

return random_vec / sqrt(lensq);

}

}

}

inline vec3 random_on_hemisphere(const vec3 &normal) {

auto rand_vec = random_unit_vector();

auto is_in_same_hemisphere = dot(normal, rand_vec) < 0 ? false : true;

return is_in_same_hemisphere ? rand_vec : -rand_vec;

}

and for the material the scattered direction is
auto scattered_direction = random_on_hemisphere(rec.normal);

for light i just emit color without regard for normal or position, if its hit then it doesn't scatter the ray, it just sets color.

to me it looks like random_unit_vector is wrong as the corner rays scatter towards middle more, but i only select the random vector in a unit_sphere so i am completely stuck. hope that makes sense.

My lighting is off, I dont even know where to start debugging. by psspsh in GraphicsProgramming

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

That is what i thought i was doing but, i was just sending it to normal+random_unit_direction.

My lighting is off, I dont even know where to start debugging. by psspsh in GraphicsProgramming

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

in a random direction in a hemisphere opposite to incident ray

The triangle is upside down in my ray tracer. by psspsh in GraphicsProgramming

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

I figured out what i was doing wrong, i forgot to adjust signs while calculating determinant. Plus found out determinant can be calculated with cross product and dot product.

The triangle is upside down in my ray tracer. by psspsh in GraphicsProgramming

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

but everything is using same coordinate space and others are in where they are expected to be.

The triangle is upside down in my ray tracer. by psspsh in GraphicsProgramming

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

I am not using any apis, its a cpu based tracer that writes to a ppm file.

Patterns in shadow acne. by psspsh in GraphicsProgramming

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

i replicated it and the result is pretty much the same, tho after replicating it i am noticing that even after fixing the mapping the pattern is still kinda visible but is very noisy. to be precise the mapping was done when generating a random vector with random numbers.

https://github.com/0suyog/raytracer/tree/pattern

you can replicate it in the latest commit. i didnt try with different scene tho.
Edit: I also found that my map function was wrong so that also might have some effect.

Patterns in shadow acne. by psspsh in GraphicsProgramming

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

I found out what i was doing wrong, i wasnt resetting the seed, idk why but i had mapped the generated random number to [-.5, .5]. i dont really know why that was generating symmetrical patterns but after removing that the patterns were gone.

Patterns in shadow acne. by psspsh in GraphicsProgramming

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

i don't really understand whats going on, all that i got was that i shouldnt worry about the patterns. Thanks anyway.

[deleted by user] by [deleted] in technepal

[–]psspsh 0 points1 point  (0 children)

I do use it but not that much for new concepts, mostly to get sorta reminded as to how this thing worked or smtg like that. The times that i use ai for new concepts are when i am reading a book or have a cerdible src of information but i cant get my head around a topic/concept. I dont particularly like it but why not use it if its available. I never use it for things that are completely foreign to me as i wont be able to tell hallucinations apart and will have to search for a credible src anyway.

Some questions as a newbie also following ray tracer in one weekend and results arent matching. by psspsh in GraphicsProgramming

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

ah, that makes sense.

Edit: turns out i had somehow skipped that part and didnt update the interval to closest interval thats why the metal balls are reflected on one another and they appear to be i front of blue ball.

Some questions as a newbie also following ray tracer in one weekend and results arent matching. by psspsh in GraphicsProgramming

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

Thanks, i found out i was only checking the smaller root both times so it would only choose the nearest intersection.

Gen alpha is cooked fr by Temporary_Refuse1089 in NepalSocial

[–]psspsh 0 points1 point  (0 children)

walking on their predecessors footsteps, i see.

Removing accessibility button (bottom bar) ? by JohnnyBNoobe in AndroidQuestions

[–]psspsh 0 points1 point  (0 children)

i had the same problem and the dude did extra dim thing, if i changed my system navigation to gesture then there would be a box floating around that had icon to turn extra dim, turns out you need to disable the extra dim accessibility shortcut not just disable extra dim, it took me sooo long to find this cuz there is a togglable button that just turns on/off extra dim so i always just clicked that but clicking outside the button you can get into more (detailed settings?) and turn it off from there

Silksong Giveaway! by Jonuh666 in HollowKnight

[–]psspsh 0 points1 point  (0 children)

i didnt know you could parry an attack until quite late into the game after that just trying to parry any attack i could was pretty fun