Component image 
Refract Material component as seen in the Scene Inspector

The RefractMaterial component can be used to create distortion or bending effects on the objects and visuals rendered behind it.
Fields
Name | Type | Description |
---|---|---|
persistent
|
Bool | Determines whether or not this item will be saved to the server. |
UpdateOrder
|
Int | Controls the order in which this component is updated. |
Enabled
|
Bool | Controls whether or not this component is enabled. Some components stop their functionality when this field is disabled, but some don't. |
HighPriorityIntegration
|
Bool | If true, integrating this asset (e.g. processing procedural assets) gets higher priority than assets with this flag off. An example is user laser procedural meshes. |
Rect
|
Rect | See RectClip on Materials. |
RectClip
|
Bool | Toggles if the material should use Rect
|
ColorMask
|
ColorMask | What colors behind the material should make it through the filter. |
StencilComparison
|
StencilComparison | See Type:StencilComparison for an in depth explanation on what this does. |
StencilOperation
|
StencilOperation | See Type:StencilOperation for an in depth explanation on what this does. |
StencilID
|
Byte | The Stencil ID of this material. This is sometimes written to the frame buffer's Stencil mask, or used to determine whether this material should render for a particular pixel. |
StencilWriteMask
|
Byte | does a Bitwise AND with this number for every pixel in the frame buffer this is rendering on top of when this object is drawn, after reading from the buffer. |
StencilReadMask
|
Byte | is bitwise ANDed with the Stencil in the frame buffer before the test compares them. |
RenderQueue
|
Int | changes at which point a material renders on the render stack |
RefractionStrength
|
Float | How strong the distortion effect is. |
DepthBias
|
Float | The bias for the depth buffer affecting the refraction strength. |
DepthFadeDivisor
|
Float | This setting uses the depth of the scene as a scaling factor for how recfracted the filter is based on this depth, so further out objects get more refracted. |
NormalMap
|
ITexture2D | The normal map to use to change how the refraction is changed depending on surface direction. |
NormalTextureScale
|
Float2 | The scale of the texture on the surface of the mesh with this material. |
NormalTextureOffset
|
Float2 | The offset of the texture on the surface of the mesh with this material. |
PerObject
|
Bool | Whether refraction effects are done per object in the scene, meaning the refraction effect can layer from other objects. |
BlendMode
|
BlendMode | How to blend this material's colors vs what it rendered on top of. |
Sidedness
|
Sidedness | Render on both sides of the mesh, front, or back. |
ZWrite
|
ZWrite | whether this material should respect the distance it is from the camera. |
ZTest
|
ZTest | Determines whether this object should render when it is in front of or behind other objects that respect depth from the camera |
_global
|
Shader | Internal. |
_perObject
|
Shader | Internal. |
Usage
Attach to a slot and add to either a MeshRenderer or SkinnedMeshRenderer to view it.
Examples
This article or section is a Stub. You can help the Resonite Wiki by expanding it.