ViroShaderModifiers

ViroShaderModifiers is a collection of modifiers grouped by the specific stage of the rendering pipeline where they should be injected. Each property can be either a raw GLSL string (which defaults to the body) or a ViroShaderModifier object for more control.

PropertyTypesDescriptionRequired
geometrystring | ViroShaderModifierModifies vertex data before it is transformed by the model-view-matrix.optional
vertexstring | ViroShaderModifierModifies the vertex position after it has been transformed into post-projection (NDC) space.optional
surfacestring | ViroShaderModifierModifies surface properties (diffuse color, normals, roughness, etc.) before lighting is calculated.optional
fragmentstring | ViroShaderModifierModifies the final pixel color after all lighting calculations are complete.optional
lightingModelstring | ViroShaderModifierAllows you to override or extend how light interacts with the surface.optional