For OpenGL multiview, it honors the qualifier `layout(num_views = X)`
specified in shader files to determine the number of views for
multiview.
We cannot recompile materials everytime the value changes. So replace
the value of num_views with the engine's eye count when shaders compile.
This PR adds a new `pause()` option to the `Engine` `Builder` and a new function
`setPaused()` to the `Engine`. While paused, the rendering thread will pause
indefinitely for commands as if none are available. As soon as the rendering
thread is unpaused, the commands are immediately executed.
in case the swapchain creation fails, it will now return a swapchain
with an EGL_NO_SURFACE handle. this will avoid having to nullptr check
the pointer in various places and will revert to the previous behavior
on failure.
FIXES=[329659681]
We verify that the buffer given to setImage() is at least as large
as needed for the given region to transfer; at least based on the
size given.
This might help catch b/330407429.
BUGS=330407429
This is due to color attachments being set to store=discard when
they are multi-sampled. It's unclear why that condition exists. For
now, removing it will fix the rendering issues with transparent
object + MSAA. We'll keep it as such until an issue surfaces.
Fixes#7674
- dynamic (default) no restriction apply
- static bounds: bounds and world transform can't be changed
- static: additionaly morphing/skinning and vertex/index buffers are
immutable.
This will allow some optimizations in the future. Currently, we just
store the type but don't do anything with it.
Plumb through multiview configurations to the pipeline so that the
engine draws scenes using multiview extension. Users need to prepare
shaders compiled with the `multiview` param and set the
`stereoscopicType` flag to MULTIVIEW in the Engine::Config to enable
multiview feature.
In this change, postprocessings for multiview are not yet supported. So
we all disable them until they're supported.
The debug option `combineMultiviewImages` combines layers as one image,
which allows us to check the final result.
- TangentsJobExtended extracts data from cgltf accessor and
runs geometry::TangentSpaceMesh on the attributes and computes
the tangent space.
- The /extended folder is meant for running this process. Note that
this API might remesh the input and will require corresponding
changes that might break previous assumptions.
- The general flow of the code is modeled after src/TangentsJob.h
- This is not hooked into current code and should have no
practical effect on gltfio.
This new parameter indicates whether the render target will be created
for multiview.
If the value is greater than 1, it tells the render target should be
created for multiview. Otherwise, 1 or 0, it creates a single layer
render target.
Instead of holding pointers to class instances in VulkanDriver,
we standardize by making the relevant classes have proper
constructors and initialize in VulkanDriver's constructor
initializer list.
- `isSwapChainProtected()` is now virtual
- `createDefaultRenderTarget()` is renamed to `getDefaultFramebufferObject()`
- new `getCurrentContextType()` returns the current context type
- `makeCurrent` now takes an additional `ContextType`
- `PlatformEGL::getContextForType()` to retrieve the `EGLContext` for
a given type.
- `PlatformEGL::makeCurrent` non-virtual utilities to set only the
context or swapchains.
For reasons unknown, after upgrading to XCode 15.3, dlopen can
no longer find libvulkan.1.dylib. We fix it by explicitly adding
/usr/local/lib to rpath for macos.
PipelineState now holds a handle to a HwVertexBufferInfo.
DriverAPI::draw() is now technically deprecated and replaced by the
more efficient draw2(), which only takes an index offset, index count
and instance count. The Pipeline to use is now specified with a new
API bindPipeline() and the primitive to use with bindRenderPrimitive().
This allows clients to reuse RenderPrimitives and ultimately Pipelines.
This change reduces CPU usage significantly on Metal and Vulkan, by
reducing the need to lookup for a pipeline at every draw call.
The application, however, must be a "good citizen" by reusing
MaterialInstance and RenderPrimitive as much as possible. We do have
RenderPrimitive cache however, so reusing the same VertexBuffer and
associated parameters also works.
Some default materials such as defaultMaterial and skybox have discrete
material file for feature level 0.
Combine these materials as one utilizing the `-P` option of matc.
This adds a new material property (float postLightingMixFactor) which
is used to mix the original color with the post-lighting blended color.
The default value is 1.0, which keeps the current behavior.
FIXES=[328498606]
cmgen mirrors environment maps by default so that the reflection map
appears un-mirrored. IBLPrefilter didn't do that.
EquirectangularToCubemap now takes a Config parameter that allows to
specify the mirroring, which is enabled by default.
FIXES=[320856413]