Improved Area Lighting in WebGL & ThreeJS

前端 未结 5 622
旧巷少年郎
旧巷少年郎 2020-12-22 19:04

I have been working on an area lighting implementation in WebGL similar to this demo:

http://threejs.org/examples/webgldeferred_arealights.html

The above imp

5条回答
  •  醉话见心
    2020-12-22 19:47

    http://s3.hostingkartinok.com/uploads/images/2013/06/9bc396b71e64b635ea97725be8719e79.png

    If I understand correctly:

    define L "Light for point x0"

    L ~ K/S^2

    S = sqrt(y^2+x0^2)

    L = sum(k/(sqrt(y^2+x0^2))^2), y=0..infinity

    L = sum(k/(y^2+x0^2)), y=0..infinity, x > 0, y > 0

    L = integral(k/(y^2+x0^2)), y=0..infinity = k*Pi/(2*x0)

    http://s5.hostingkartinok.com/uploads/images/2013/06/6dbb7b6d3babc092d3daf18bb3c6e6d5.png

    Answer:

    L = k*Pi/(2*x0)

    k depends on the environment

提交回复
热议问题