Repository navigation
v0.5.0
Pre-release
Pre-release
This is a large release with a bunch of small features, reorganization, and one big new crate (fidget-wgpu, re-exported as fidget::wgpu). The goal of fidget::wgpu is to perform all pixel-processing operations on the GPU, including both rasterization (function evaluation) and shading. Right now, the crate has building blocks for voxel rendering; pixel rendering is coming in a subsequent release. Expect the APIs to change shape as I actually try to use them in an application.
- Big reorganization of
fidget::rasterrender2dandrender3dmodules are renamed topixelandvoxel, respectivelyImageRenderConfigandVoxelRenderConfigare both renamed toRenderConfig(in different namespaces)- Similarly, each namespace contains an
ImageandRenderSizetype definition.voxel::ImagereplacesGeometryBuffer;pixel::Imageis equivalent tofidget::raster::Image<DistancePixel>in the previous code (but see the next point about renaming!) - Renamed
DistancePixeltoRawDistancePixel; added an unpackedenum DistancePixel(instead of usingResult<f32, PixelFill>as a weirdEithertype - The tile sizes member of
RenderConfigis now optional and will fall back to the evaluator's tile size if not populated- This adds a
F: RenderHintstrait bound for many functions infidget::raster
- This adds a
- Add
Image::buildfunction to build an image from aVec<T>andImageSizeLike, returning an error if the data size is incorrect. - Revamping
fidget-bytecode- Reserve register
u8::MAXto represent an inline immediate - Remove separate opcodes, e.g.
SubRegReg,SubRegImm, andSubImmRegnow all generateBytecodeOp::Sub(using the reserved register as needed for immediates). - This also removes the
enum RegOpDiscriminantsfromfidget_core reg_countandmem_countare now counts (rather than "highest value")
- Reserve register
- Add
PartialEqforGeometryPixel - Major refactoring of error types
fidget::Erroris removed in favor of fine-grained error types- The error type for a function now represents all of the errors that it can return (and no others)
- All errors still implement standard error traits, so application-level code using
anyhow(or similar) may not need to change
- Fix a bug in bulk evaluator argument checks where mismatched slices could be allowed under some circumstances
- Add
VmData::asmto get an immutable reference to the innerRegTape - Add
RegTape::repack_mapandRegTape::repackto repack registers by frequency (making register 0 the most frequently used, etc) - Add
RegOp::visit_regsandRegOp::visit_regs_mutto visit registers in an operation - Add
fidget-wgpucrate- This is even more experimental than the rest of Fidget!
- There are two user-facing modules:
voxeldoes voxel rasterization (depth and normal), andeffectsdoes raster effects (e.g. shading) - More to come (e.g. RGB evaluation and pixel / 2D rasterization)
- Add
VarMap::iterto iterate over(var, index)tuples - Simplified
Shape, which was doing too much- It no longer has its own transform matrix; bring your own to the evaluation functions (with new
eval_with_transformflavors) - It no longer supports custom axes; it now always uses
Var::{X, Y, Z} - Other tweaks to shape evaluation functions:
eval_vis noweval_with_vars, and there's a separateeval_with_transform(along witheval_with_transform_and_vars). These all return new error types too!
- It no longer has its own transform matrix; bring your own to the evaluation functions (with new
- Add
output_count()toFunctiontrait - Add
ShapeVars::checkandShapeVars::contains_keyto check whether the variable map is sufficient to evaluate a particular shape. - Change
fidget_rasterandfidget_meshfunctions to take aBoundShape<F>, which represents a shape and all of its associated variables. ABoundShapemay be constructed usingTryFromfor shapes with no variables other than X, Y, Z; otherwise,Shape::bindmust be used. This removes a potentialunwrap()during rendering, because evaluation requires all variables to be present. - Rename
trait ImageSizeLiketotrait RenderSizeinfidget_raster; removewidthandheightfromtrait RenderConfigand add aRenderConfig: RenderSizebound - Improve denoising pass: back-facing normals are now removed from candidates
- Switched
GeometryPixelback to having au32for depth; we are planning to move more post-processing to the GPU, so it's helpful to keep pixels lossless for as long as possible. - Add
From<VoxelSize> for ImageSize(which drops the depth value) - Add
Image::as_bytes(), which returns the raw byte array (e.g. for saving to a file). - Add
Image::as_slice(), which returns the raw pixel array as a slice - Improve
fidget_raster::effects::compute_ssao- Fix pixel-center position (which caused a subtle bias)
- Make noise sampling more random, eliminating cyclic patterns that led to horizontal striations
- Correctly handle non-square images (fixing a known deficiency)
- Use rejection sampling when building kernel and noise arrays to uniformly sample on the boundary of a unit sphere / circle (this is probably overkill, but can prevent very subtle biases)
- Transposed
ssao_kernelandssao_noisematrices so that they can be directly uploaded to the GPU asarray<array<f32, 3>>andarray<vec2f>buffers respectively
- Remove
Defaultfromfidget_raster::{voxel, pixel}::RenderConfig, because baking in a size is a questionable API choice. AddedRenderConfig::from_sizeas a replacement, which can similarly be used as a base for constructing a semi-custom instance.