VR4RoboticArm3/VR4RoboticArm/Library/PackageCache/com.meta.xr.sdk.interaction/Runtime/Sample/Shaders/InteractionCG.cginc
IonutMocanu 1d45ac8df0 Main1
2025-09-15 21:53:38 +03:00

9 lines
303 B
HLSL

uniform half _DitherStrength;
inline half DitherAnimatedNoise(half2 screenPos) {
half noise = frac(
dot(uint3(screenPos, floor(fmod(_Time.y * 10, 4))), uint3(2, 7, 23) / 17.0f));
noise -= 0.5; // remap from [0..1[ to [-0.5..0.5[
half noiseScaled = (noise / _DitherStrength);
return noiseScaled;
}