zoukankan      html  css  js  c++  java
  • Efficient GPU Screen-Space Ray Tracing

    http://jcgt.org/published/0003/04/04/paper.pdf

    一个号称只有2ms的实时gpu光线追踪

    screen space reflection用到了

    和其他ray tracing的区别是 scene data 只用了depth buffer

    setp 超过depth 就算hit

    jitter可以补偿 间隔sample 产生的带状artifacts

    看下来也没那么难 给了代码

    核心DDA方法是这个

    def drawLine(x0, y0, x1, y1):

    if x1−x0>y1−y0:

      slope = y1−y0 x1 − x0

      for t = 0 to x1 −x0:

      setPixel(x0 +t,y0 +t ·slope) 

    else:

      slope = x1−x0 y1 − y0

      for t = 0 to y1 −y0:

      setPixel(x0 +t ·slope, y0 +t) 

    用这个可以算出3D point对应的 2D光栅化的点 

    然后推了个公式出来 代码就是直接套这个公式了

    Q′(x,y) = (Q·k)(x,y)/k(x, y) 

    讲了很多细节

  • 相关阅读:
    8月4日
    8月3日 hive配置
    8月2日
    8月1日
    7月31日
    7月30日
    7月29日
    7月28日
    第六周总结
    重大技术需求进度报告一
  • 原文地址:https://www.cnblogs.com/minggoddess/p/9461272.html
Copyright © 2011-2022 走看看