Skip to content

v0.4.0

Latest

Choose a tag to compare

@shawn0326 shawn0326 released this 30 Sep 03:49

变更日志

  • 重构: 升级 t3d 依赖到 v0.5.x
  • 新增: 为 EffectComposer 添加 allowSceneDirectRender 属性
  • 新增(addons): 添加 SMAAEffect
  • 新增(examples): 为示例页面头部添加 GitHub 链接
  • 文档: 改进 README 并添加英文文档
  • 构建(examples): 压缩 lowpoly_lake 模型资源

迁移指南

依赖版本升级

从该版本开始,t3d-effect-composer 要求 t3d 版本为 v0.5.x 或更高。在升级前,请确保您的项目中 t3d 版本已升级至 v0.5.x 以上。

渲染状态 API 变更

库内部已迁移至 t3d v0.5.x 的新 RenderTarget 渲染状态设置 API,并支持从传入的 renderTarget 中读取渲染状态。

兼容性处理: 如果您的项目尚未迁移到新的 API 使用方式,可以通过设置以下选项来保持向后兼容:

effectComposer.useTargetStates = false;

Effect 实现优化

对于自定义 Effect 的开发者,现在可以使用 effectComposer.$setEffectContextStates 方法来简化实现逻辑,该方法会自动处理 renderTarget 渲染状态的兼容性。

迁移建议: 如果您有自定义的 Effect 实现,建议参考内置 Effect 的代码进行相应改造,以获得更好的性能和兼容性。

Changelog

  • refactor: upgrade t3d dependency to v0.5.x
  • feat: add allowSceneDirectRender property to EffectComposer
  • feat(addons): add SMAAEffect
  • feat(examples): add GitHub link to examples header
  • docs: improve README and add English documentation
  • chore(examples): compress lowpoly_lake model asset

Migration Guide

Dependency Version Upgrade

Starting from this version, t3d-effect-composer requires t3d version v0.5.x or higher. Before upgrading, please ensure that your project's t3d version has been upgraded to v0.5.x or above.

Render State API Changes

The library has migrated to t3d v0.5.x's new RenderTarget render state setting API and supports reading render states from the passed renderTarget.

Compatibility Handling: If your project has not yet migrated to the new API usage, you can maintain backward compatibility by setting the following option:

effectComposer.useTargetStates = false;

Effect Implementation Optimization

For custom Effect developers, you can now use the effectComposer.$setEffectContextStates method to simplify implementation logic. This method automatically handles renderTarget render state compatibility.

Migration Recommendation: If you have custom Effect implementations, we recommend referring to the built-in Effect code for corresponding modifications to achieve better performance and compatibility.

Full Changelog: v0.3.4...v0.4.0