1cb24b41b0
When ActionScript uses a ByteArray/Vector.<Number> as a shader input or target, we create a temporary Rgba32Float texture, and copy the input float32 bytes to/from the texture. Unfortunately, wgpu doesn't seem to support an Rgb32Float (3-channel) texture. When the shader uses 3 channels, we use a Rgba32Float (4-channel) texture, and manually insert/remove padding for the alpha channels. This isn't very efficient, but it's the simplest solution. The temporary textures themselves aren't cached anywhere - if this becomes a performance issue, we could look into using some of our existing wgpu texture/buffer pooling code. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |