Updated Mesh Colliders of all Humans and added FOV Representation

This commit is contained in:
Thorbjoern
2025-07-16 00:02:07 +02:00
parent 8e711ca067
commit 74f2ecabd2
38 changed files with 7876 additions and 44 deletions
@@ -0,0 +1,40 @@
Shader "Hidden/GazeOverlay"
{
SubShader
{
Tags { "RenderType" = "Opaque" "RenderPipeline" = "UniversalPipeline" }
pass
{
Name "GazeOverlayPass"
ZTest Always
ZWrite Off
Blend SrcAlpha OneMinusSrcAlpha
HLSLPROGRAM
#pragma vertex VertFullScreenTriangle
#pragma fragment frag
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
struct Varyings
{
float4 positionHCS : SV_POSITION;
float2 texcoord : TEXCOORD0;
};
Varyings VertFullScreenTriangle (uint vertexID : SV_VERTEXID)
{
Varyings o;
o.positionHCS = GetFullScreenTriangleVertexPosition(vertexID);
o.texcoord = GetFullScreenTriangleTexCoord(vertexID);
return o;
}
#include "GazeOverlayPass.hlsl"
ENDHLSL
}
}
FallBack Off
}
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 777cec444743bc44b817fad6d93d915b
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,42 @@
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
TEXTURE2D_X(_CameraDepthTexture);
SAMPLER(sampler_CameraDepthTexture);
float3 _GazeOrigin;
float3 _GazeDirection;
float _FoveaAngle;
float _PeriAngle;
float4 _FoveaColor = float4(0,1,0,0.25);
float4 _periColor = float4(1,0,0,0.18);
float4 _BlockedCol = float4(0.3,0.3,0.3,0.22);
half4 frag (Varyings input) : SV_Target
{
return float4(1, 0, 1, 0.5);
// Nimmt die Depth Texture und rekonstruiert daraus die World Position
//float depth = SAMPLE_TEXTURE2D_X(_CameraDepthTexture, sampler_CameraDepthTexture, input.texcoord).r;
//float4 clip = float4(input.texcoord * 2 - 1, depth, 1);
//float4 view = mul(UNITY_MATRIX_I_P, clip); view /= view.w;
//float3 world = mul(UNITY_MATRIX_I_V, view).xyz;
// Eryeugt einen Vektor vom Origin zum gewünschten Pixel
//float3 v = normalize(world - _GazeOrigin);
//float cosAng = dot(v, normalize(_GazeOrigin));
// Berechnung Cosinus
//float cosF = cos(_FoveaAngle);
//float cosP = cos(_PeriAngle);
//float4 col;
//if (cosAng >= cosF) col = _FoveaColor;
//else if (cosAng >= cosP) col = _periColor;
//else discard;
//uint gLayer = 8;
//if (unity_RenderingLayer.x & (1u << gLayer))
//col = _BlockedCol;
//return col;
}
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: da1b9d6b6b4c65941be255287d846932
ShaderIncludeImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: