可以在 AGAL 操作中对数字进行硬编码吗?
如果我尝试简单地将 1.0 添加到寄存器的一个颜色通道,我可以:
- 使用一些我不知道的浮点语法直接写入它,或者...
- 我是否必须将数字传递给常量首先,并在那里使用那个常量寄存器?
我正在尝试做的示例:
//AGAL code - Just trying to add one to red-value of ft1, and assign it to ft2
add ft2.r, ft1.r, 1.0
If I try to simply add 1.0 to one color-channel of a register, can I:
- Write it directly with some float-number syntax I'm not aware of, or...
- Do I have to pass in the number to a constant first, and use that constant register there?
Example of what I'm trying to do:
//AGAL code - Just trying to add one to red-value of ft1, and assign it to ft2
add ft2.r, ft1.r, 1.0
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不幸的是不行,你必须通过 fc0 等传递常量
Unfortunately no, you have to pass the constant in. via fc0, etc