Search found 83 matches

by MohamedSakr
Mon Feb 23, 2015 11:26 pm
Forum: General Development
Topic: photon mapping + final gather light leaks
Replies: 3
Views: 4913

Re: photon mapping + final gather light leaks

thanks a lot :) , you are correct about the corner case where the ray gathers the near wall "wrong" radiance photon!! , I think I know now how to solve it.
cheers.
by MohamedSakr
Sun Feb 22, 2015 7:51 am
Forum: General Development
Topic: photon mapping + final gather light leaks
Replies: 3
Views: 4913

photon mapping + final gather light leaks

I understand how final gather works "to some extent" , I'm using PBRT 2 as a reference.
the problem is, light leaks appear at corners!!, any idea of a robust solution?
by MohamedSakr
Sat Feb 14, 2015 7:56 pm
Forum: General Development
Topic: Russian Roulette for terminating volumetric ray marching?
Replies: 2
Views: 3840

Re: Russian Roulette for terminating volumetric ray marching

Tr = 0; is wrong for this reason: you have a ray which is entering a volume sphere, you have "entering ray Lenter, exiting ray Lexit" in this case Lexit is depending mainly on the absorption of the volume sphere, and in general if the volume is homogenous: Lexit = Lenter * someConstant; here if you ...
by MohamedSakr
Tue Nov 25, 2014 5:59 pm
Forum: General Development
Topic: Question about Bottom-up traversal used in LBVH and TRBVH
Replies: 14
Views: 9816

Re: Question about Bottom-up traversal used in LBVH and TRBV

Thanks sriravic, MohamedSakr. Let me confirm to determine whether my understand about the atomic is right or not. If 2 threads enter the while loop at the same time, that is, execute the atomic_inc(), is there a case that each returned value is 0? (The initial value of counters are 0.) I think the ...
by MohamedSakr
Tue Nov 25, 2014 1:19 pm
Forum: General Development
Topic: Question about Bottom-up traversal used in LBVH and TRBVH
Replies: 14
Views: 9816

Re: Question about Bottom-up traversal used in LBVH and TRBV

this means the while loop won't get entered at all!! it will always be while(false) { } to solve this, you will need to make the while condition: while ((atomic_inc(counters + pIdx) == 0) || last_thread_to_enter_this_node) the variable last_thread_to_enter_this_node should mark the thread which KNOW...
by MohamedSakr
Tue Nov 25, 2014 2:10 am
Forum: General Development
Topic: Question about Bottom-up traversal used in LBVH and TRBVH
Replies: 14
Views: 9816

Re: Question about Bottom-up traversal used in LBVH and TRBV

I consider the initial value of counters pointer is 1 at all nodes the problem here is "there is no second access!!" so the while loop will enter each node only ONCE!!, any other thread trying to enter this node after this will be kicked out BTW, I'm really interested in implementing TRBVH, we may c...
by MohamedSakr
Tue Nov 25, 2014 1:11 am
Forum: General Development
Topic: Question about Bottom-up traversal used in LBVH and TRBVH
Replies: 14
Views: 9816

Re: Question about Bottom-up traversal used in LBVH and TRBV

I see a problem, but let me be sure first if (pIdx == 0), this expression is for the termination right? , how is pIdx determined here?? "so when pIdx != 0??" another main problem is: 2 threads enter the while loop at the same time, first thread enters, terminate at the if statement, 2nd thread won't...
by MohamedSakr
Mon Nov 24, 2014 10:51 pm
Forum: General Development
Topic: Question about Bottom-up traversal used in LBVH and TRBVH
Replies: 14
Views: 9816

Re: Question about Bottom-up traversal used in LBVH and TRBV

I'm not sure, and I may be wrong "so clarify more about the code" atomic_inc(counters + pIdx) , I sense that this expression is kinda false, atomics are used on shared/global memory, in this case you are using it on local memory, which will do nothing!! "so all threads will enter in the first iterat...