res-avatar-unity/Assets/_PoiyomiShaders/Shaders/7.3/Patreon/VoxelCubed/Includes/PoiFun.cginc

62 lines
1.2 KiB
HLSL
Raw Normal View History

2023-07-16 02:51:23 +00:00
#ifndef FUN
#define FUN
int _Mirror;
void applyFun(inout float4 vertex)
{
bool inMirror = IsInMirror();
UNITY_BRANCH
if (_Mirror == 0)
{
return;
}
if(_Mirror == 1 && inMirror)
{
return;
}
if(_Mirror == 1 && !inMirror)
{
vertex = -1;
return;
}
if(_Mirror == 2 && inMirror)
{
vertex = -1;
return;
}
if(_Mirror == 2 && !inMirror)
{
return;
}
}
void applyFunFrag()
{
bool inMirror = IsInMirror();
UNITY_BRANCH
if(_Mirror == 0)
{
return;
}
if(_Mirror == 1 && inMirror)
{
return;
}
if(_Mirror == 1 && !inMirror)
{
clip(-1);
return;
}
if(_Mirror == 2 && inMirror)
{
clip(-1);
return;
}
if(_Mirror == 2 && !inMirror)
{
return;
}
}
#endif