I am currently implementing GPU shaders ddx ddy instructions
by examining neighbor rays’ intersection values, be it world space
position or texture coordinate at the point of intersection. For a single sampled, one ray per screen space pixel and
square shaped ray packet, I can infer which rays are the immediate neighbors. Of
course, this requires the rays to be ordered and not have been re-sorted in
some fashion, for example, by same materials. This approach may not work for other sampling shapes or
multi-sampled schemes. If there is a better way, I would appreciate some tips. Guides
for the sampling schemes would also be helpful. Thanks |
Archive powered by MHonArc 2.6.16.