spine中Additive等无法输入 hdr色,在不另外制作一张图的情况下怎么实现辉光效果?
  • Messaggi: 10


不幸的是,您的观察是正确的,在当前的 Spine 版本中,插槽不能分配 HDR 颜色 > 1.0。


  1. 使用两个相同的添加剂附件(正如你已经提到的),
  2. 为它编写自己的着色器(修改现有的着色器)。 然后,您可以有一个额外的灰度“HDR 增强”输入图集纹理,它将所有附加像素标记为白色,然后将其乘以给定的增强因子。
  3. 将导出后的图集贴图修改为 HDR 贴图,使发光部分更亮(并保存为 .exr)。

选项 (1) 将是最有效的选项,因为它可以在单个绘制调用和单个纹理中完成。 选项(3)只是一个未经测试的想法,理论上应该可行,但我们不会真正推荐它。
Unfortunately your observations are correct, in current Spine versions, a slot can't have an HDR color > 1.0 assigned.

Which runtime are you using?

Workarounds for now would either be to:
  1. Use two identical additive attachments (as you mentioned already),
  2. To write your own shader (modify an existing shader) for it. You could then have an additional grayscale "HDR boost" input atlas texture which marks all additive pixels white, which will then be multiplied by a given boost factor.
  3. Modify the atlas texture after export to be an HDR texture with the emissive parts made brighter (saved as .exr).

Option (1) would be the most efficient one, since it can be done in a single draw call and a single texture. Option (3) is just an untested idea which should work in theory, but we would not really recommend it.
Avatar utente

  • Messaggi: 4206

Torna a 中国Spine用户