manual 补充,尝试迁移 cpu backend

This commit is contained in:
bk_office
2026-04-27 14:57:32 +08:00
parent b4f167e5f6
commit b7f90b0c9e
10 changed files with 179 additions and 59 deletions

View File

@ -1,22 +1,18 @@
# 指令介绍
简易 Raymarch 小玩具
用法march <scene>
用法march `<scene>`
march sphere(1).color(red) box(0.5, 2.0, 0.5).pos(0, 0, 0) cam(0.5).pos(-5).lookat(0)
# 主要语法
<scene> ::= <scene> "." <op>
| <obj>
`<scene>` ::= `<scene>` "." `<op>` |`<obj>`
<obj> ::= <obj_ty>
| <obj_ty> "(" <args> ")"
`<obj>` ::= `<obj_ty>` | `<obj_ty>` "(" <args> ")"
<op> ::= <op_ty>
| <op_ty> "(" <args> ")"
`<op>` ::= `<op_ty>` | `<op_ty>` "(" `<args>` ")"
<args> ::= <args> "," <arg>
| <arg>
`<args>` ::= `<args>` "," `<arg>` | `<arg>`
其中 obj_tyop_ty 分别为物体类型(如 cubespheretorus 等)与变换类型(如 posrot
其中 `obj_ty`、`op_ty` 分别为物体类型(如 `cube`、`sphere`、`torus` 等)与变换类型(如 `pos`、`rot`)。
# 特殊说明
<op_ty> 不包含 scale,因为本工具基于 SDF 渲染,非正交的变换会破坏 SDF 的性质。
`<op_ty>` 不包含 scale非正交的变换会破坏 SDF 的性质。