【问题标题】:Order of light calculation on scene场景光照计算顺序
【发布时间】:2023-03-17 18:37:01
【问题描述】:

场景中的灯光(或其类型)顺序重要吗?

我正在使用 OpenGL 开发前向渲染器,根据灯光顺序我有不同的结果(阴影颜色)(每个灯光都有自己的加法混合通道)

【问题讨论】:

  • 它们的位置不会改变 - 只是它们被应用在哪个通道中。在第一个屏幕截图中,橙色点光在第一个通道中计算,第二个在第二个通道中应用。

标签: opengl rendering light blending


【解决方案1】:

我使用了错误的渲染管道配置顺序:

bind framebuffer
set viewport & clear buffers
depth stage settings
blending settings
other rasterizer settings

我已将set viewport & clear buffers 移到最后。现在无论照明(渲染通道)顺序如何,一切看起来都一样。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-12-26
    • 1970-01-01
    • 1970-01-01
    • 2018-03-10
    • 1970-01-01
    • 1970-01-01
    • 2021-12-14
    相关资源
    最近更新 更多