各言語ドキュメントのpixelshader節を更新

このコミットが含まれているのは:
routersys committed 2026-07-04 12:04:44 +09:00
1 親 d31fd77aee
コミット ed4c38772f
8ファイル変更
+139 -44

検索条件に一致するファイルはありません

+19 -6
ファイルの表示
@@ -518,8 +518,11 @@
"cache:name" : Named cache (kept across frames)
Example: obj.copybuffer("tmp", "obj") -- save
obj.copybuffer("obj", "tmp") -- restore
* "frm" (frame buffer / background) cannot be obtained due to the
structure of YMM4.
* "frm" (frame buffer) can be used as a copy source. Its content is
a virtual image made by compositing the object at its current
position onto a transparent scene-sized area. YMM4 cannot access
the background, so the background is not included. It cannot be
used as a copy destination.
o obj.pixelshader(name, target, resources [, constants [, blend [, sampler]]])
Runs an HLSL pixel shader defined inside the script on the GPU.
@@ -530,14 +533,22 @@
float4 name(float4 pos : SV_Position) : SV_Target { ... }
]]
name : Name of the defined shader as a string.
target : One of "object", "tempbuffer", "cache:name".
target : One of "object", "tempbuffer", "cache:name",
"framebuffer". "framebuffer" renders into a scene-sized
virtual frame buffer and replaces the object image with
the result.
resources : Array of buffer names bound to t0-t7. A single name can
be passed directly as a string. "random" binds a 256x256
region (R32_FLOAT) of random values in 0.0-1.0.
"framebuffer" binds the scene-sized virtual frame buffer
with the object composited at its current position.
constants : Array of numbers, packed into constant buffer b0 as an
array of floats.
blend : "copy" (as is), "mask" (multiplies alpha only), "draw"
(alpha blend), "add" (additive). Default is "copy".
Passing a number equal to an obj.setoption("blend", n)
mode composites the shader output onto the target with
the corresponding YMM4 blend mode.
sampler : One of "clip", "clamp", "loop", "mirror", "dot". Bound
to SamplerState s0. Unset when omitted.
The pixel shader input can be either of the following.
@@ -545,9 +556,11 @@
float4 name(float4 pos : SV_Position, float2 uv : TEXCOORD) : SV_Target
uv is set so that the drawing area spans 0.0-1.0.
Example: obj.pixelshader("ps", "object", "object", {obj.track0}, "copy")
* Runs on the MoonSharp engine (selected automatically without a
directive).
* "framebuffer" cannot be used due to the structure of YMM4.
* Runs on both engines. The shader itself always executes on the
host GPU.
* YMM4 cannot access the background, so the initial content of
"framebuffer" is a virtual image made by compositing the object
onto a transparent scene-sized area.
* The call is skipped in environments without a usable GPU.
o obj.getvalue(target)