Table of Contents

Class ColorVisionFeature

Namespace
FishMMO.Client
Assembly
FishMMO.Client.dll

The full-screen colour-vision correction: daltonises the 3D view for the colour vision the player has chosen (ClientColorVisionSettings), so colours the eye would confuse are pulled apart.

public class ColorVisionFeature : ScriptableRendererFeature, IDisposable
Inheritance
Object
ScriptableObject
ScriptableRendererFeature
ColorVisionFeature
Implements
Inherited Members
ScriptableRendererFeature.OnCameraPreCull(ScriptableRenderer, in CameraData)
ScriptableRendererFeature.Dispose()
ScriptableRendererFeature.isActive
ScriptableRendererFeature.useIntermediateTextures
ScriptableObject.SetDirty()
ScriptableObject.CreateInstance<T>()
Object.GetEntityId()
Object.MemberwiseClone()
Object.GetInstanceID()
Object.GetHashCode()
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion, Transform)
Object.Instantiate(Object)
Object.Instantiate(Object, Scene)
Object.Instantiate<T>(T, InstantiateParameters)
Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.Instantiate(Object, Transform)
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.Destroy(Object)
Object.DestroyImmediate(Object)
Object.DontDestroyOnLoad(Object)
Object.DestroyObject(Object)
Object.FindObjectsOfType<T>()
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindObjectOfType<T>()
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Object.FindObjectsByType<T>()
Object.FindObjectsByType<T>(FindObjectsInactive)
Object.ToString()
Object.name
Object.hideFlags

Remarks

After post-processing (the frame as tonemapped and graded, in linear values) and before the UI, which has its own safe colours and must not be shifted twice. One full-screen pass into a new colour texture that then becomes the camera's colour, so nothing is copied back. With Normal vision, the filter off or its strength at 0, no pass is added.

The correction is the usual daltonisation: simulate what the dichromat sees (Machado et al. 2009, severity 1), take the difference from the original, and move it into the channels that eye does distinguish. It cannot add information, only move it, so it is a supplement to the safe colours (ColorVision), not a replacement for them.

Fields

CorrectionShader

[Tooltip("The correction shader (Hidden/FishMMO/ColorVision). Referenced here so a build carries it: Shader.Find only finds a shader something in the build references. Left empty, it is found by name, which works in the editor alone.")]
public Shader CorrectionShader

Field Value

Shader

ShaderName

public const string ShaderName = "Hidden/FishMMO/ColorVision"

Field Value

string

Methods

AddRenderPasses(ScriptableRenderer, ref RenderingData)

public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData renderingData)

Parameters

renderer ScriptableRenderer
renderingData RenderingData

Create()

public override void Create()

Dispose(bool)

protected override void Dispose(bool disposing)

Parameters

disposing bool