diff options
| author | yum <yum.food.vr@gmail.com> | 2025-07-23 22:53:08 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2025-07-23 22:53:08 -0700 |
| commit | 4539f87e36cb3ca554e1e174c19206b552107c57 (patch) | |
| tree | 6f9aca818989773cc10f3c465224a07f847eb279 /Shaders/poi.cginc | |
| parent | f6b93a20d754579008076e85f5c0a97e1bcbc258 (diff) | |
Delete unused filesv1.0.0-beta00
Diffstat (limited to 'Shaders/poi.cginc')
| -rw-r--r-- | Shaders/poi.cginc | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/Shaders/poi.cginc b/Shaders/poi.cginc deleted file mode 100644 index 87382bb..0000000 --- a/Shaders/poi.cginc +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef __POI_INC__ -#define __POI_INC__ - -/* -MIT License - -Copyright (c) 2018 King Arthur - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -static const float Epsilon = 1e-10; -float3 RGBtoHCV(in float3 RGB) -{ - // Based on work by Sam Hocevar and Emil Persson - float4 P = (RGB.g < RGB.b) ? float4(RGB.bg, -1.0, 2.0 / 3.0) : float4(RGB.gb, 0.0, -1.0 / 3.0); - float4 Q = (RGB.r < P.x) ? float4(P.xyw, RGB.r) : float4(RGB.r, P.yzx); - float C = Q.x - min(Q.w, Q.y); - float H = abs((Q.w - Q.y) / (6 * C + Epsilon) + Q.z); - return float3(H, C, Q.x); -} - -float3 RGBtoHSV(in float3 RGB) -{ - float3 HCV = RGBtoHCV(RGB); - float S = HCV.y / (HCV.z + Epsilon); - return float3(HCV.x, S, HCV.z); -} - -float3 HUEtoRGB(in float H) -{ - float R = abs(H * 6 - 3) - 1; - float G = 2 - abs(H * 6 - 2); - float B = 2 - abs(H * 6 - 4); - return saturate(float3(R, G, B)); -} - -float3 HSVtoRGB(in float3 HSV) -{ - float3 RGB = HUEtoRGB(HSV.x); - return ((RGB - 1) * HSV.y + 1) * HSV.z; -} - -#endif // __POI_INC__ |
