ShaderTranslation
final class ShaderTranslation
Package: dev.joid.lib.bridge.render.shader.source · Module: core · Source: ShaderTranslation.java
The translated sources of a shader, ready for the graphics API, the vertex and fragment stages and the optional stencil write stage.
Description
Section titled “Description”GlslShaderTranslator.translate returns it, and the constructor of Shader hands it to the compileProgram hook of the backend.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
ShaderTranslation | of(GlslDialect dialect, String vertex, String fragment, String stencilFragment) factory | Creates a translation from a dialect, the vertex and fragment sources, and the stencil fragment source, or null when the shader has no stencil write stage. |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
GlslDialect | getDialect() | Returns the dialect of the sources, which tells the backend how to compile and link them, such as whether it binds the attribute locations itself. |
String | getVertex() | Returns the complete source of the vertex stage. |
String | getFragment() | Returns the complete source of the fragment stage. |
String | getStencilFragment() | Returns the fragment stage of the stencil write pass, which outputs the updated stencil value; null without stencil emulation. |
Creation details
Section titled “Creation details”ShaderTranslation of(GlslDialect dialect, String vertex, String fragment, String stencilFragment) factory
Creates a translation from a dialect, the vertex and fragment sources, and the stencil fragment source, or null when the shader has no stencil write stage.
Method details
Section titled “Method details”getDialect
Section titled “getDialect”GlslDialect getDialect()
Returns the dialect of the sources, which tells the backend how to compile and link them, such as whether it binds the attribute locations itself.
getVertex
Section titled “getVertex”String getVertex()
Returns the complete source of the vertex stage.
getFragment
Section titled “getFragment”String getFragment()
Returns the complete source of the fragment stage.
getStencilFragment
Section titled “getStencilFragment”String getStencilFragment()
Returns the fragment stage of the stencil write pass, which outputs the updated stencil value; null without stencil emulation.
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
