Netcode Bootstrap
This commit is contained in:
+77
@@ -0,0 +1,77 @@
|
||||
Shader "RukhankaBoneOutlineRenderer"
|
||||
{
|
||||
SubShader
|
||||
{
|
||||
PackageRequirements
|
||||
{
|
||||
"com.unity.render-pipelines.high-definition": "1.0.0"
|
||||
}
|
||||
Tags
|
||||
{
|
||||
"RenderPipeline" = "HDRenderPipeline"
|
||||
"RenderType" = "HDUnlitShader"
|
||||
"Queue" = "Transparent+0"
|
||||
}
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "ForwardOnly"
|
||||
Tags
|
||||
{
|
||||
"LightMode" = "ForwardOnly"
|
||||
}
|
||||
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
ZTest off
|
||||
|
||||
HLSLPROGRAM
|
||||
#pragma target 3.0
|
||||
|
||||
#pragma vertex VS
|
||||
#pragma fragment PS
|
||||
#define BONE_OUTLINE
|
||||
#define IS_HDRP
|
||||
|
||||
#include "RukhankaBoneRenderer.hlsl"
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
SubShader
|
||||
{
|
||||
PackageRequirements
|
||||
{
|
||||
"com.unity.render-pipelines.universal": "1.0.0"
|
||||
}
|
||||
Tags
|
||||
{
|
||||
"RenderPipeline"="UniversalPipeline"
|
||||
"Queue" = "Transparent+0"
|
||||
}
|
||||
|
||||
Pass
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"LightMode" = "UniversalForward"
|
||||
}
|
||||
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
ZTest off
|
||||
|
||||
HLSLPROGRAM
|
||||
#pragma target 3.0
|
||||
|
||||
#pragma vertex VS
|
||||
#pragma fragment PS
|
||||
#define BONE_OUTLINE
|
||||
|
||||
#include "RukhankaBoneRenderer.hlsl"
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 740a4e84dd61c564fbfc15932a58081f
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 298480
|
||||
packageName: Rukhanka Animation System 2
|
||||
packageVersion: 2.9.0
|
||||
assetPath: Packages/com.rukhanka.animation/Rukhanka.DebugDrawer/Resources/RukhankaBoneOutlineRenderer.shader
|
||||
uploadId: 897522
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
#ifndef RUKHANKA_BONE_RENDERER_HLSL_
|
||||
#define RUKHANKA_BONE_RENDERER_HLSL_
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
|
||||
#include "RukhankaDebugDrawerCommon.hlsl"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
struct VertexInput
|
||||
{
|
||||
float3 pos: POSITION;
|
||||
uint vertexID: SV_VertexID;
|
||||
uint instanceID: SV_InstanceID;
|
||||
};
|
||||
|
||||
struct VertexToPixel
|
||||
{
|
||||
float4 pos: SV_Position;
|
||||
float4 color: COLOR0;
|
||||
};
|
||||
|
||||
struct BoneData
|
||||
{
|
||||
float3 pos0, pos1;
|
||||
uint colorTri, colorLines;
|
||||
};
|
||||
|
||||
StructuredBuffer<BoneData> boneDataBuf;
|
||||
float4x4 unity_MatrixVP;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
float3 GetStableTangent(float3 v)
|
||||
{
|
||||
float3 aV = abs(v);
|
||||
float3 rv = float3(-v.y, v.z, 0);
|
||||
|
||||
if (aV.x <= aV.y && aV.x <= aV.z) rv = float3(0, -v.z, v.y);
|
||||
else if (aV.y <= aV.y && aV.y <= aV.z) rv = float3(-v.z, 0, v.x);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
float3 ComputeVertexWorldPos(BoneData bd, float3 vertexPos, int vertexID)
|
||||
{
|
||||
float3 worldPos = 0;
|
||||
|
||||
switch (vertexID)
|
||||
{
|
||||
case 0: worldPos = bd.pos0; break;
|
||||
case 5: worldPos = bd.pos1; break;
|
||||
default:
|
||||
{
|
||||
float3 boneVec = bd.pos0 - bd.pos1;
|
||||
float l = length(boneVec);
|
||||
if (l != 0)
|
||||
{
|
||||
float3 boneVecNrm = boneVec / l;
|
||||
float3 tangent = GetStableTangent(boneVecNrm);
|
||||
float3 t = normalize(cross(boneVecNrm, tangent));
|
||||
float3 n = normalize(cross(boneVecNrm, t));
|
||||
|
||||
float3 offsetVec = t * vertexPos.x - n * vertexPos.z;
|
||||
worldPos = bd.pos1 + boneVec * 0.3f + offsetVec * l;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
return worldPos;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
VertexToPixel VS(VertexInput i)
|
||||
{
|
||||
VertexToPixel o = (VertexToPixel)0;
|
||||
BoneData bd = boneDataBuf[i.instanceID];
|
||||
|
||||
float3 worldPos = ComputeVertexWorldPos(bd, i.pos, i.vertexID);
|
||||
|
||||
worldPos = GetCameraRelativePositionWS(worldPos);
|
||||
o.pos = mul(unity_MatrixVP, float4(worldPos, 1));
|
||||
#ifdef BONE_OUTLINE
|
||||
o.color = UnpackColor(bd.colorLines);
|
||||
#else
|
||||
o.color = UnpackColor(bd.colorTri);
|
||||
#endif
|
||||
return o;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
float4 PS(VertexToPixel i): SV_Target0
|
||||
{
|
||||
return i.color;
|
||||
}
|
||||
|
||||
#endif
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9ad43a2adc0e63f4b9e27f8ef82924c4
|
||||
ShaderIncludeImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 298480
|
||||
packageName: Rukhanka Animation System 2
|
||||
packageVersion: 2.9.0
|
||||
assetPath: Packages/com.rukhanka.animation/Rukhanka.DebugDrawer/Resources/RukhankaBoneRenderer.hlsl
|
||||
uploadId: 897522
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
Shader "RukhankaBoneTriangleRenderer"
|
||||
{
|
||||
SubShader
|
||||
{
|
||||
PackageRequirements
|
||||
{
|
||||
"com.unity.render-pipelines.high-definition": "1.0.0"
|
||||
}
|
||||
Tags
|
||||
{
|
||||
"RenderPipeline" = "HDRenderPipeline"
|
||||
"RenderType" = "HDUnlitShader"
|
||||
"Queue" = "Transparent+0"
|
||||
}
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "ForwardOnly"
|
||||
Tags
|
||||
{
|
||||
"LightMode" = "ForwardOnly"
|
||||
}
|
||||
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
ZTest off
|
||||
|
||||
HLSLPROGRAM
|
||||
#pragma target 3.0
|
||||
|
||||
#pragma vertex VS
|
||||
#pragma fragment PS
|
||||
#define IS_HDRP
|
||||
|
||||
#include "RukhankaBoneRenderer.hlsl"
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
SubShader
|
||||
{
|
||||
PackageRequirements
|
||||
{
|
||||
"com.unity.render-pipelines.universal": "1.0.0"
|
||||
}
|
||||
Tags
|
||||
{
|
||||
"RenderPipeline"="UniversalPipeline"
|
||||
"Queue" = "Transparent+0"
|
||||
}
|
||||
|
||||
Pass
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"LightMode" = "UniversalForward"
|
||||
}
|
||||
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
ZTest off
|
||||
|
||||
HLSLPROGRAM
|
||||
#pragma target 3.0
|
||||
|
||||
#pragma vertex VS
|
||||
#pragma fragment PS
|
||||
|
||||
#include "RukhankaBoneRenderer.hlsl"
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2b3326df71f53a44188448c6506106e4
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 298480
|
||||
packageName: Rukhanka Animation System 2
|
||||
packageVersion: 2.9.0
|
||||
assetPath: Packages/com.rukhanka.animation/Rukhanka.DebugDrawer/Resources/RukhankaBoneTriangleRenderer.shader
|
||||
uploadId: 897522
|
||||
+180
@@ -0,0 +1,180 @@
|
||||
#ifndef RUKHANKA_DEBUG_DRAWER_HLSL_
|
||||
#define RUKHANKA_DEBUG_DRAWER_HLSL_
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
|
||||
#ifdef IS_HDRP
|
||||
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightDefinition.cs.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariablesGlobal.cs.hlsl"
|
||||
#endif
|
||||
|
||||
#include "RukhankaDebugDrawerCommon.hlsl"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
struct VertexInput
|
||||
{
|
||||
uint vertexID: SV_VertexID;
|
||||
};
|
||||
|
||||
struct VertexToPixel
|
||||
{
|
||||
float4 pos: SV_Position;
|
||||
float3 normal: NORMAL;
|
||||
float2 uv: TEXCOORD0;
|
||||
float4 color: COLOR0;
|
||||
};
|
||||
|
||||
struct LineData
|
||||
{
|
||||
float3 pos[2];
|
||||
uint color;
|
||||
};
|
||||
|
||||
struct ThickLineData
|
||||
{
|
||||
float3 pos[2];
|
||||
float thickness;
|
||||
uint color;
|
||||
};
|
||||
|
||||
struct TriData
|
||||
{
|
||||
float3 pos[3];
|
||||
uint color;
|
||||
};
|
||||
|
||||
StructuredBuffer<LineData> lineDataBuf;
|
||||
StructuredBuffer<ThickLineData> thickLineDataBuf;
|
||||
StructuredBuffer<TriData> triDataBuf;
|
||||
float4x4 unity_MatrixVP;
|
||||
float4x4 unity_MatrixV;
|
||||
|
||||
#ifdef IS_HDRP
|
||||
StructuredBuffer<DirectionalLightData> _DirectionalLightDatas;
|
||||
#else
|
||||
float4 _MainLightPosition;
|
||||
float4 _MainLightColor;
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
VertexToPixel VSLines(VertexInput i)
|
||||
{
|
||||
VertexToPixel o = (VertexToPixel)0;
|
||||
uint lineID = i.vertexID >> 1;
|
||||
uint vertexID = i.vertexID & 1;
|
||||
|
||||
LineData ln = lineDataBuf[lineID];
|
||||
float3 worldPos = ln.pos[vertexID];
|
||||
|
||||
worldPos = GetCameraRelativePositionWS(worldPos);
|
||||
o.pos = mul(unity_MatrixVP, float4(worldPos, 1));
|
||||
o.color = UnpackColor(ln.color);
|
||||
return o;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
VertexToPixel VSThickLines(VertexInput i)
|
||||
{
|
||||
VertexToPixel o = (VertexToPixel)0;
|
||||
uint instanceID = i.vertexID / 6;
|
||||
uint triangleID = (i.vertexID - instanceID * 6) / 3;
|
||||
uint vertexID = i.vertexID - instanceID * 6 - triangleID * 3;
|
||||
uint posID = (vertexID + triangleID) >> 1;
|
||||
uint leftRightID = (vertexID + triangleID) & 1;
|
||||
|
||||
ThickLineData tld = thickLineDataBuf[instanceID];
|
||||
float3 worldPos = tld.pos[posID];
|
||||
|
||||
float3 dp = tld.pos[0] - tld.pos[1];
|
||||
float3 viewVec = unity_MatrixV[2].xyz;
|
||||
float3 c = cross(viewVec, dp);
|
||||
c = normalize(c) * (leftRightID * 2.0f - 1) * tld.thickness;
|
||||
|
||||
worldPos += c;
|
||||
o.uv = float2(leftRightID, posID);
|
||||
|
||||
worldPos = GetCameraRelativePositionWS(worldPos);
|
||||
o.pos = mul(unity_MatrixVP, float4(worldPos, 1));
|
||||
o.color = UnpackColor(tld.color);
|
||||
o.color.a = 1;
|
||||
return o;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
VertexToPixel VSTriangle(VertexInput i)
|
||||
{
|
||||
VertexToPixel o = (VertexToPixel)0;
|
||||
uint triangleID = i.vertexID / 3;
|
||||
uint vertexID = i.vertexID - triangleID * 3;
|
||||
|
||||
TriData td = triDataBuf[triangleID];
|
||||
|
||||
const uint2 neighbourIndices[] =
|
||||
{
|
||||
uint2(2, 1),
|
||||
uint2(0, 2),
|
||||
uint2(1, 0),
|
||||
};
|
||||
|
||||
float3 p0p2 = td.pos[neighbourIndices[vertexID].x] - td.pos[vertexID];
|
||||
float3 p0p1 = td.pos[neighbourIndices[vertexID].y] - td.pos[vertexID];
|
||||
|
||||
float3 normal = 0;
|
||||
float eps = 0.00001f;
|
||||
if (length(p0p1) > eps && length(p0p2) > eps)
|
||||
{
|
||||
normal = cross(p0p2, p0p1);
|
||||
normal = normalize(normal);
|
||||
}
|
||||
|
||||
float3 worldPos = td.pos[vertexID];
|
||||
|
||||
worldPos = GetCameraRelativePositionWS(worldPos);
|
||||
o.pos = mul(unity_MatrixVP, float4(worldPos, 1));
|
||||
o.normal = normal;
|
||||
o.color = UnpackColor(td.color);
|
||||
return o;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void GetMainLight(out float3 lightDir, out float3 color)
|
||||
{
|
||||
#ifdef IS_HDRP
|
||||
if (_DirectionalLightCount > 0)
|
||||
{
|
||||
DirectionalLightData light = _DirectionalLightDatas[0];
|
||||
lightDir = -light.forward.xyz;
|
||||
color = light.color;
|
||||
}
|
||||
else
|
||||
{
|
||||
lightDir = float3(1, 0, 0);
|
||||
color = 0;
|
||||
}
|
||||
#else
|
||||
lightDir = _MainLightPosition.rgb;
|
||||
color = _MainLightColor.rgb;
|
||||
#endif
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
float4 PS(VertexToPixel i): SV_Target0
|
||||
{
|
||||
float4 rv = i.color;//float4(0, 0, 0, 1);
|
||||
if (length(i.normal) > 0.1f)
|
||||
{
|
||||
float3 mainLightDir, mainLightColor;
|
||||
GetMainLight(mainLightDir, mainLightColor);
|
||||
float df = dot(mainLightDir, i.normal) * 0.5f + 0.5f;
|
||||
|
||||
rv.rgb *= df;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
#endif
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b2600e13e03c73d4dbd65c4462783350
|
||||
ShaderIncludeImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 298480
|
||||
packageName: Rukhanka Animation System 2
|
||||
packageVersion: 2.9.0
|
||||
assetPath: Packages/com.rukhanka.animation/Rukhanka.DebugDrawer/Resources/RukhankaDebugDrawer.hlsl
|
||||
uploadId: 897522
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
#ifndef RUKHANKA_DEBUG_DRAWER_COMMON_HLSL_
|
||||
#define RUKHANKA_DEBUG_DRAWER_COMMON_HLSL_
|
||||
|
||||
float3 GetCameraRelativePositionWS(float3 positionWS)
|
||||
{
|
||||
#if (SHADEROPTIONS_CAMERA_RELATIVE_RENDERING != 0)
|
||||
positionWS -= _WorldSpaceCameraPos.xyz;
|
||||
#endif
|
||||
return positionWS;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
float4 UnpackColor(uint color)
|
||||
{
|
||||
float4 rv = float4
|
||||
(
|
||||
color >> 24,
|
||||
color >> 16 & 0xff,
|
||||
color >> 8 & 0xff,
|
||||
color & 0xff
|
||||
);
|
||||
rv = rv / 255.0f;
|
||||
return rv;
|
||||
}
|
||||
|
||||
#endif
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1df1990c6dd59af4284e0a4cd18d791e
|
||||
ShaderIncludeImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 298480
|
||||
packageName: Rukhanka Animation System 2
|
||||
packageVersion: 2.9.0
|
||||
assetPath: Packages/com.rukhanka.animation/Rukhanka.DebugDrawer/Resources/RukhankaDebugDrawerCommon.hlsl
|
||||
uploadId: 897522
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
Shader "RukhankaDebugLineDrawer"
|
||||
{
|
||||
SubShader
|
||||
{
|
||||
PackageRequirements
|
||||
{
|
||||
"com.unity.render-pipelines.high-definition": "1.0.0"
|
||||
}
|
||||
Tags
|
||||
{
|
||||
"RenderPipeline" = "HDRenderPipeline"
|
||||
"RenderType" = "HDUnlitShader"
|
||||
"Queue" = "Transparent+0"
|
||||
}
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "ForwardOnly"
|
||||
Tags
|
||||
{
|
||||
"LightMode" = "ForwardOnly"
|
||||
}
|
||||
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
ZTest off
|
||||
|
||||
HLSLPROGRAM
|
||||
#pragma target 3.0
|
||||
|
||||
#pragma vertex VSLines
|
||||
#pragma fragment PS
|
||||
#define IS_HDRP
|
||||
|
||||
#include "RukhankaDebugDrawer.hlsl"
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
SubShader
|
||||
{
|
||||
PackageRequirements
|
||||
{
|
||||
"com.unity.render-pipelines.universal": "1.0.0"
|
||||
}
|
||||
Tags
|
||||
{
|
||||
"RenderPipeline"="UniversalPipeline"
|
||||
"Queue" = "Transparent+0"
|
||||
}
|
||||
|
||||
Pass
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"LightMode" = "UniversalForward"
|
||||
}
|
||||
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
ZTest off
|
||||
|
||||
HLSLPROGRAM
|
||||
#pragma target 3.0
|
||||
|
||||
#pragma vertex VSLines
|
||||
#pragma fragment PS
|
||||
|
||||
#include "RukhankaDebugDrawer.hlsl"
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bf9e89bd9ebe67449a5cf05c583a337b
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 298480
|
||||
packageName: Rukhanka Animation System 2
|
||||
packageVersion: 2.9.0
|
||||
assetPath: Packages/com.rukhanka.animation/Rukhanka.DebugDrawer/Resources/RukhankaDebugLineDrawer.shader
|
||||
uploadId: 897522
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
Shader "RukhankaDebugThickLineDrawer"
|
||||
{
|
||||
SubShader
|
||||
{
|
||||
PackageRequirements
|
||||
{
|
||||
"com.unity.render-pipelines.high-definition": "1.0.0"
|
||||
}
|
||||
Tags
|
||||
{
|
||||
"RenderPipeline" = "HDRenderPipeline"
|
||||
"RenderType" = "HDUnlitShader"
|
||||
"Queue" = "Transparent+0"
|
||||
}
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "ForwardOnly"
|
||||
Tags
|
||||
{
|
||||
"LightMode" = "ForwardOnly"
|
||||
}
|
||||
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
ZTest off
|
||||
Cull off
|
||||
|
||||
HLSLPROGRAM
|
||||
#pragma target 3.0
|
||||
|
||||
#pragma vertex VSThickLines
|
||||
#pragma fragment PS
|
||||
#define IS_HDRP
|
||||
|
||||
#include "RukhankaDebugDrawer.hlsl"
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
SubShader
|
||||
{
|
||||
PackageRequirements
|
||||
{
|
||||
"com.unity.render-pipelines.universal": "1.0.0"
|
||||
}
|
||||
Tags
|
||||
{
|
||||
"RenderPipeline"="UniversalPipeline"
|
||||
"Queue" = "Transparent+0"
|
||||
}
|
||||
|
||||
Pass
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"LightMode" = "UniversalForward"
|
||||
}
|
||||
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
ZTest off
|
||||
Cull off
|
||||
|
||||
HLSLPROGRAM
|
||||
#pragma target 3.0
|
||||
|
||||
#pragma vertex VSThickLines
|
||||
#pragma fragment PS
|
||||
|
||||
#include "RukhankaDebugDrawer.hlsl"
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5a6fef881541c584eac17bcb9bef86c9
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 298480
|
||||
packageName: Rukhanka Animation System 2
|
||||
packageVersion: 2.9.0
|
||||
assetPath: Packages/com.rukhanka.animation/Rukhanka.DebugDrawer/Resources/RukhankaDebugThickLineDrawer.shader
|
||||
uploadId: 897522
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
Shader "RukhankaDebugTriangleDrawer"
|
||||
{
|
||||
SubShader
|
||||
{
|
||||
PackageRequirements
|
||||
{
|
||||
"com.unity.render-pipelines.high-definition": "1.0.0"
|
||||
}
|
||||
Tags
|
||||
{
|
||||
"RenderPipeline" = "HDRenderPipeline"
|
||||
"RenderType" = "HDUnlitShader"
|
||||
"Queue" = "Transparent+0"
|
||||
}
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "ForwardOnly"
|
||||
Tags
|
||||
{
|
||||
"LightMode" = "ForwardOnly"
|
||||
}
|
||||
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
Cull Front
|
||||
|
||||
HLSLPROGRAM
|
||||
#pragma target 3.0
|
||||
|
||||
#pragma vertex VSTriangle
|
||||
#pragma fragment PS
|
||||
#define IS_HDRP
|
||||
|
||||
#include "RukhankaDebugDrawer.hlsl"
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
SubShader
|
||||
{
|
||||
PackageRequirements
|
||||
{
|
||||
"com.unity.render-pipelines.universal": "1.0.0"
|
||||
}
|
||||
Tags
|
||||
{
|
||||
"RenderPipeline"="UniversalPipeline"
|
||||
"Queue" = "Transparent+0"
|
||||
}
|
||||
|
||||
Pass
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"LightMode" = "UniversalForward"
|
||||
}
|
||||
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
Cull front
|
||||
|
||||
HLSLPROGRAM
|
||||
#pragma target 3.0
|
||||
|
||||
#pragma vertex VSTriangle
|
||||
#pragma fragment PS
|
||||
|
||||
#include "RukhankaDebugDrawer.hlsl"
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: eed38dd879f9ccb48945c1bf4d062a2b
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 298480
|
||||
packageName: Rukhanka Animation System 2
|
||||
packageVersion: 2.9.0
|
||||
assetPath: Packages/com.rukhanka.animation/Rukhanka.DebugDrawer/Resources/RukhankaDebugTriangleDrawer.shader
|
||||
uploadId: 897522
|
||||
Reference in New Issue
Block a user