Skip to content

Instantly share code, notes, and snippets.

@paulrus123
paulrus123 / WaterStencil
Created April 9, 2020 20:30
Water Stencil Shader
Shader "Unlit/WaterStencil"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
[IntRange] _StencilRef ("Stencil Reference Value", Range(0,255)) = 10
}
SubShader
{
@paulrus123
paulrus123 / DepthWaterShader
Created April 9, 2020 20:27
Water Shader for Cloud Anchors Pong
Shader "Unlit/DepthWaterShader"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
_DepthGradientShallow("Depth Gradient Shallow", Color) = (0.325, 0.807, 0.971, 0.725)
_DepthGradientDeep("Depth Gradient Deep", Color) = (0.086, 0.407, 1, 0.749)
_DepthMaxDistance("Depth Maximum Distance", Float) = 1
_Amplitude ("Amplitude", Float) = 1 //Amplitude of wave
Vector3 velocityBasedEstimatedPosition = m_messageStruct.position + m_messageStruct.velocity * latency;
Vector3 velocityBasedEstimatedPosition = m_messageStruct.position + m_messageStruct.velocity * latency;
Vector3 velocityBasedEstimatedPosition = m_messageStruct.position + m_messageStruct.velocity * latency;