This commit is contained in:
2025-11-13 17:40:28 +08:00
parent 962ab49609
commit 10156da245
5503 changed files with 805282 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
Shader "PXR_SDK/PXR_CubemapBlit" {
Properties{
_MainTex("MainTex", CUBE) = "white" {}
_d("Direction", Int) = 0
_Gamma("Gamma", Range(0.1, 5)) = 1.0
}
SubShader{
Tags{ "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" }
Pass{
ZWrite Off
ColorMask RGBA
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
struct appdata
{
float4 vertex : POSITION;
float2 texcoord : TEXCOORD0;
};
struct v2f
{
float4 vertex : POSITION;
half3 cubedir : TEXCOORD0;
};
samplerCUBE _MainTex;
int _d;
float _Gamma;
v2f vert(appdata v)
{
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
float3 of[6] = { {1.0, -1.0, 1.0}, {-1.0, -1.0, -1.0}, {-1.0, 1.0, 1.0}, {-1.0, -1.0, -1.0}, {-1.0, -1.0, 1.0}, { 1.0, -1.0, -1.0} };
float3 uf[6] = { {0.0, 0.0, -1.0}, { 0.0, 0.0, 1.0}, { 1.0, 0.0, 0.0}, { 1.0, 0.0, 0.0}, { 1.0, 0.0, 0.0}, {-1.0, 0.0, 0.0} };
float3 vf[6] = { {0.0, 1.0, 0.0}, { 0.0, 1.0, 0.0}, { 0.0, 0.0, -1.0}, { 0.0, 0.0, 1.0}, { 0.0, 1.0, 0.0}, { 0.0, 1.0, 0.0} };
o.cubedir = of[_d] + 2.0 * v.texcoord.x * uf[_d] + 2.0 * (1.0 - v.texcoord.y) * vf[_d];
return o;
}
fixed4 frag(v2f v) : COLOR
{
fixed4 col = texCUBE(_MainTex, v.cubedir);
if (_Gamma != 1)
col.rgb = pow(col.rgb, _Gamma);
return col;
}
ENDCG
}
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 33ce0c27f4dfbf04da9d549e94760211
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
preprocessorOverride: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,94 @@
Shader "PXR_SDK/PXR_EyeMask"
{
Properties
{
_MeshOffsetX("MeshOffsetX", Float) = 1
_Color("MaskColor", Color) = (0, 0, 0, 1)
}
SubShader
{
Tags { "RenderType" = "Opaque" "Queue" = "Background"}
LOD 100
Pass
{
ZWrite On
Cull Off
ZTest Always
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
struct appdata
{
float4 vertex : POSITION;
};
struct v2f
{
float4 vertex : POSITION;
};
sampler2D _MainTex;
float4 _MainTex_ST;
fixed4 _Color;
v2f vert(appdata v)
{
v2f o;
o.vertex = v.vertex;
return o;
}
fixed4 frag(v2f i) : SV_Target
{
return fixed4(_Color);
}
ENDCG
}
Pass
{
ZWrite On
Cull Off
ZTest Always
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
struct appdata
{
float4 vertex : POSITION;
};
struct v2f
{
float4 vertex : POSITION;
};
sampler2D _MainTex;
float4 _MainTex_ST;
float _MeshOffsetX;
fixed4 _Color;
v2f vert(appdata v)
{
v2f o;
o.vertex = float4(v.vertex.x - (unity_StereoEyeIndex * 2.0f - 1) * _MeshOffsetX, v.vertex.yz, -1);
return o;
}
fixed4 frag(v2f i) : SV_Target
{
return fixed4(_Color);
}
ENDCG
}
}
}

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 00203bc285eee1949bba54824bd30b35
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,16 @@
Shader "PXR_SDK/PXR_Fade" {
Properties{
_Color("Color", Color) = (0,0,0,1)
}
SubShader{
Tags{ "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" }
LOD 100
ZWrite Off
ZTest Always
Blend SrcAlpha OneMinusSrcAlpha
Color[_Color]
Pass{}
}
}

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 063346ae0d043c442916db0b9ec57a0f
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,62 @@
Shader "PXR_SDK/PXR_Texture2DBlit" {
Properties{
_MainTex("Base (RGB) Trans (A)", 2D) = "white" {}
_premultiply("Pre-multiply alpha", Int) = 0
_Gamma("Gamma", Range(0.1, 5)) = 1.0
}
SubShader{
Tags{ "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" }
Pass{
ZTest Always
ZWrite Off
Cull Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
struct appdata_t
{
float4 vertex : POSITION;
float2 texcoord : TEXCOORD0;
};
struct v2f
{
float4 vertex : SV_POSITION;
half2 texcoord : TEXCOORD0;
};
sampler2D _MainTex;
float4 _MainTex_ST;
int _premultiply;
float _Gamma;
v2f vert (appdata_t v)
{
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
o.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
return o;
}
fixed4 frag (v2f i) : COLOR
{
fixed4 col = tex2D(_MainTex, i.texcoord);
if (_premultiply)
col.rgb *= col.a;
if(_Gamma != 1)
col.rgb = pow(col.rgb, _Gamma);
return col;
}
ENDCG
}
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: d105636b7d36f0c478a7b50d9a091bca
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
preprocessorOverride: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,58 @@
Shader "PXR_SDK/PXR_UnderlayHole"
{
Properties
{
_MainTex("Texture(A)", 2D) = "black" {}
}
SubShader
{
Tags { "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" }
LOD 100
ZWrite Off
Blend Zero OneMinusSrcAlpha,Zero Zero
ColorMask RGBA
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
struct appdata
{
float4 vertex : POSITION;
float2 texcoord : TEXCOORD0;
};
struct v2f
{
float4 vertex : SV_POSITION;
float2 texcoord : TEXCOORD0;
};
sampler2D _MainTex;
v2f vert(appdata v)
{
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
o.texcoord = v.texcoord;
return o;
}
fixed4 frag(v2f i) : SV_Target
{
fixed4 col = tex2D(_MainTex, i.texcoord);
col.r = 0;
col.g = 0;
col.b = 0;
col.a = col.a;
return col;
}
ENDCG
}
}
}

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 8b3745a660fe21a4db96dacec14d653e
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant: