UniformLayout
enum UniformLayout
Package: dev.joid.lib.bridge.render.shader.source · Module: core · Source: UniformLayout.java
How a translated program declares its uniforms, in one std140 block or one by one.
Description
Section titled “Description”A backend chooses it when it creates its GlslShaderTranslator.
In both layouts, the Shader keeps the values in the same UniformBlock; only the way the backend sends them changes.
Backend note: the OpenGL backends use LOOSE, Vulkan uses BLOCK.
Learn more
Section titled “Learn more”Values
Section titled “Values”| Value | Summary |
|---|---|
BLOCK | Declares every uniform in one std140 block; the backend packs it with UniformBlock.pack and sends the whole buffer. |
LOOSE | Declares each uniform on its own; the backend sends each changed member with UniformBlock.upload. |
Value details
Section titled “Value details”BLOCK
Declares every uniform in one std140 block; the backend packs it with UniformBlock.pack and sends the whole buffer.
It needs a dialect with uniform blocks.
LOOSE
Declares each uniform on its own; the backend sends each changed member with UniformBlock.upload.
It works in every dialect.
fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses
