ws-tex: docs/guide sections (textures / HDR, OpenRaster); DDS / KTX pixelFormat option; XBM / XPM names from F.save
F.save sets opts.format to the file format, so the DDS / KTX layout option is pixelFormat; XBM / XPM make a C identifier of opts.name (F.save passes the file name).
This commit is contained in:
1 parent
d618795ce7
commit
918c8310af
10 files changed
+90
-30
No files matched your search
@@ -56,13 +56,13 @@ if which == "dds" then
|
||||
local Dds = require("@formats/image/dds")
|
||||
local img = image(37, 23, "rgba8", 0)
|
||||
for _, f in { "rgba8", "bgra8", "bc1", "bc3", "bc4", "bc5" } do
|
||||
emit("ours_" .. f .. ".dds", Dds.encode(img, { format = f :: any }))
|
||||
emit("ours_" .. f .. "_mips.dds", Dds.encode(img, { format = f :: any, mips = true }))
|
||||
emit("ours_" .. f .. ".dds", Dds.encode(img, { pixelFormat = f :: any }))
|
||||
emit("ours_" .. f .. "_mips.dds", Dds.encode(img, { pixelFormat = f :: any, mips = true }))
|
||||
end
|
||||
emit("ours_rgba8_dx10.dds", Dds.encode(img, { dx10 = true, mips = true }))
|
||||
emit("ours_rgba16.dds", Dds.encode(image(37, 23, "rgba16", 0), { mips = true }))
|
||||
emit("ours_rgba32f.dds", Dds.encode(image(37, 23, "rgbaf32", 0, 4), { mips = true }))
|
||||
emit("ours_rgba16f.dds", Dds.encode(image(37, 23, "rgbaf32", 0, 4), { format = "rgba16f" }))
|
||||
emit("ours_rgba16f.dds", Dds.encode(image(37, 23, "rgbaf32", 0, 4), { pixelFormat = "rgba16f" }))
|
||||
local cube = image(16, 16, "rgba8", 0)
|
||||
cube.frames = {}
|
||||
for i = 1, 6 do
|
||||
@@ -71,7 +71,7 @@ if which == "dds" then
|
||||
cube.meta.layout = "cube"
|
||||
emit("ours_cube.dds", Dds.encode(cube, { mips = true }))
|
||||
cube.meta.layout = "array"
|
||||
emit("ours_array_bc1.dds", Dds.encode(cube, { format = "bc1" }))
|
||||
emit("ours_array_bc1.dds", Dds.encode(cube, { pixelFormat = "bc1" }))
|
||||
end
|
||||
|
||||
if which == "ktx" then
|
||||
@@ -82,7 +82,7 @@ if which == "ktx" then
|
||||
emit("ours_srgb_zlib.ktx2", Ktx.encode(img, { mips = true, srgb = true, zlib = 6 }))
|
||||
emit("ours_rgba16.ktx2", Ktx.encode(image(37, 23, "rgba16", 0), { mips = true }))
|
||||
emit("ours_rgba32f.ktx2", Ktx.encode(image(37, 23, "rgbaf32", 0, 4), { mips = true }))
|
||||
emit("ours_rgba16f.ktx2", Ktx.encode(image(37, 23, "rgbaf32", 0, 4), { format = "rgba16f" }))
|
||||
emit("ours_rgba16f.ktx2", Ktx.encode(image(37, 23, "rgbaf32", 0, 4), { pixelFormat = "rgba16f" }))
|
||||
local cube = image(16, 16, "rgba8", 0)
|
||||
cube.frames = {}
|
||||
for i = 1, 6 do
|
||||
|
||||
Reference in new issue
Block a user