-
Notifications
You must be signed in to change notification settings - Fork 5
Aardvark Rendering 5.4 changelog
Martin edited this page May 30, 2023
·
2 revisions
- Implemented new compute task API replacing the old low-level imperative design (https://github.com/aardvark-platform/aardvark.rendering/issues/94).
- For Vulkan
ComputeCommand.CopyImageCmd
now uses proper PixImage coordinate space (origin top-left, same as in the OpenGL backend). - Renamed
IComputeShaderInputBinding
toIComputeInputBinding
. For backwards compatibility with the imperative API useMutableComputeInputBinding
. - Renamed
IComputeRuntime.Compile
toIComputeRuntime.CompileCompute
- Replaced
ComputeProgram<unit>
withIComputeTask
- Renamed
NewInputBinding
toCreateInputBinding
- For Vulkan
- Various improvements for buffer related methods and interfaces:
-
IBackendBuffer
inherits fromIBufferRange
. - Renamed
IBufferRange.Size
toSizeInBytes
. - Added
Range()
andElements()
methods for getting subranges of buffers. - Renamed certain
Copy()
methods toUpload()
andDownload()
. - Added and modified
Download()
,Upload()
andCopy()
overloads to be consistent. - Merged
BufferRange
intoBuffer
module.
-
- Improved how vertex and instance attributes are provided and interpreted:
- Floating point attributes may now be provided via 8bit and 16bit (and 32bit for GL) integer data as normalized or scaled values:
- Normalized means that the integer represents a fixed-point value. Unsigned integers are mapped to [0.0, 1.0] while signed integers are mapped to [-1.0, 1.0]. For example,
C4b(255, 51, 204, 255)
would map toV4d(1.0, 0.2, 0.8, 1.0)
in the shader. See also: https://registry.khronos.org/vulkan/specs/1.3-extensions/html/chap3.html#fundamentals-fixedconv - Scaled means that the integer value is simply converted to float. So passing a value of
1234us
will result in a value of1234.0
in the shader.
- Normalized means that the integer represents a fixed-point value. Unsigned integers are mapped to [0.0, 1.0] while signed integers are mapped to [-1.0, 1.0]. For example,
- Previously, only
C4b
colors could be passed as normalized fixed-point values. This release extends this feature to any integer-based scalar, vector and color type. The newBufferView.Normalized
property determines whether the data are interpreted as normalized or scaled. By default,Normalized
istrue
to be backwards compatible with the old behavior forC4b
. Note that this property only has an effect if the attribute is floating-point based and if the input data are integral. - If attribute data are incompatible with the shader, a meaningful exception will be thrown. With the OpenGL backend it is possible to accidentally (or purposefully) provide double data for float-based attributes. This may impact performance negatively, so a warning is printed if debugging is enabled:
[GL] attribute 'Positions' expects Aardvark.Base.V4f elements but Aardvark.Base.V3d elements were provided. Using double-based attribute types may result in degraded performance.
-
SingleValueBuffer
is now generic, making it possible to set attributes other thanV4f
. Likewise,Sg.vertexBufferValue
accepts any unmanaged value (https://github.com/aardvark-platform/aardvark.rendering/issues/27).
- Floating point attributes may now be provided via 8bit and 16bit (and 32bit for GL) integer data as normalized or scaled values:
- Fixed issues related to backface culling (https://github.com/aardvark-platform/aardvark.rendering/issues/101):
- Added
Sg.frontFacing
and madeSg.frontFace
obsolete. To migrate to the new function the winding order has to be reversed (e.g. useWindingOrder.reverse
) - The shader input
gl_FrontFacing
(viaFrontFacingAttribute
) now has the correct value. Note: For the GL backend the value was flipped in previous versions, for the Vulkan backend the behavior is unchanged. - Some
IndexedGeometryPrimitives
have had their winding order fixed and made consistent.solidPhiThetaSphere
had clockwise winding order, which is back facing for default pipeline states.solidCoordinateBox
,solidBox
andsolidTetrahedron
had some faces with clockwise winding order.
- Added
- Improved validation of uniform inputs. If a texture / buffer is missing or has an invalid type, an exception will be thrown instead of just logging an error. This will make it easier to find bugs that may have gone unnoticed before.
- Added
IRuntime.Blit : src : IFramebufferOutput * srcRegion : Box3i * dst : IFramebufferOutput * dstRegion : Box3i -> unit
which allows copying data from a texture / renderbuffer region to another with support for scaling and mirroring. TheIRuntime
methodsCopy
(withIFramebufferOutput
parameters) andResolveMultisamples
are now implemented as extensions that useBlit
internally. - Converted
TraceObject
andTraceInstance
module functions into static methods with overloads. - Removed
traceObject
andtraceInstance
builders. Use the static methods of the corresponding type instead. - Added singleton pattern for
NullTexture
and marked its constructor as obsolete. UsenullTexture
orNullTexture.Instance
instead. - Added
UniformMap
for building uniform providers with type checks and implicit casts that are required by the backend. -
RaytracingPipelineState
usesIUniformProvider
instead of a map. -
IRaytacingTask.Update
andRun
useRenderToken
now. - Fixed various issues and memory leaks in
Aardvark.GPGPU
. - Removed
TextureLayout.Sample
, useTextureLayout.ShaderRead
instead. - Removed
Queries
struct to combine multiple queries.RenderToken
now simply contains a list ofIQuery
objects. -
RenderObject
is now a proper class instead of a record (https://github.com/aardvark-platform/aardvark.rendering/issues/58). A render object can be constructed in one of three ways:- Default constructor (e.g.
let ro = RenderObject()
) which generates and assigns a new unique id. This is equivalent toRenderObject.Create()
. - Copy constructor (e.g.
let ro = RenderObject other
) which creates an exact copy including the id. - Cloning (e.g.
let ro = RenderObject.Clone other
) which creates a copy with a new unique id. This is equivalent tolet ro = { other with Id = newId() }
.
- Default constructor (e.g.
- Removed
Sg.ofIndexedGeometryInterleaved
(was broken since 5.1) - Fixed padding of 2x2 and 2x3 matrices when used as uniforms.
- [Vulkan] Implemented dynamic / changeable shaders (https://github.com/aardvark-platform/aardvark.rendering/issues/76).
- [Vulkan] Reversed winding order of tessellated triangles to be consistent with OpenGL backend.
- [Vulkan] Added
RuntimeConfig.DepthRange
(https://github.com/aardvark-platform/aardvark.rendering/issues/66) - [GL] Moved
Config.NumberOfResourceContexts
toRuntimeConfig
- [GL] Moved
Config.DepthRange
toRuntimeConfig
- [GL] Removed
RuntimeConfig.ShareBuffersBetweenTasks
andRuntimeConfig.ShareTexturesBetweenTasks
flags. The code path that was used when setting any of them tofalse
was broken. - [GL] Marked
Context.CurrentContextHandle
obsolete. UseContextHandle.Current
instead. Both use the same thread-local object now. Previously, the thread-local behind theContext
member did not properly track all context handle changes (i.e. when callingMakeCurrent()
on a context handle directly). - [GL] Added
RuntimeConfig.AllowConcurrentResourceAccess
to disable global resource lock for compute and render tasks.AbstractRenderTask.ResourcesInUse
has been removed. For GL useGlobalResourceLock.using
instead. - [GL] Moved
ResourceCache
andResourceInputSet
from base project and made internal. - [GL] Fixed issue with resource manager and typed buffers.
- [GL] Removed dead code from resource manager.
- [GL] Removed unused
pUniforms
fromPreparedPipelineState
andUniformLocation
. - [GL] Added support for null textures with any bind target (e.g. 3D)
- Removed
InputSet
. - [GL] Fixed minor memory leaks in render tasks.