Add shader package include dependency pipeline

This commit is contained in:
2026-04-25 15:13:12 +08:00
parent 378965efca
commit d5eaa339f9
24 changed files with 1991 additions and 49 deletions

View File

@@ -0,0 +1,7 @@
#ifndef XC_UNIVERSAL_CORE_INCLUDED
#define XC_UNIVERSAL_CORE_INCLUDED
#include "Packages/com.xcengine.render-pipelines.core/ShaderLibrary/ShaderVariables.hlsl"
#include "Packages/com.xcengine.render-pipelines.core/ShaderLibrary/SpaceTransforms.hlsl"
#endif

View File

@@ -0,0 +1,19 @@
#ifndef XC_UNIVERSAL_INPUT_INCLUDED
#define XC_UNIVERSAL_INPUT_INCLUDED
struct Attributes
{
float3 positionOS : POSITION;
float3 normalOS : NORMAL;
float2 texcoord : TEXCOORD0;
};
struct Varyings
{
float4 positionCS : SV_POSITION;
float3 normalWS : TEXCOORD0;
float2 texcoord : TEXCOORD1;
float3 positionWS : TEXCOORD2;
};
#endif

View File

@@ -0,0 +1,22 @@
#ifndef XC_UNIVERSAL_REALTIME_LIGHTS_INCLUDED
#define XC_UNIVERSAL_REALTIME_LIGHTS_INCLUDED
static const int XC_MAX_ADDITIONAL_LIGHTS = 8;
struct AdditionalLightData
{
float4 colorAndIntensity;
float4 positionAndRange;
float4 directionAndType;
float4 spotAnglesAndFlags;
};
cbuffer LightingConstants
{
float4 gMainLightDirectionAndIntensity;
float4 gMainLightColorAndFlags;
float4 gLightingParams;
AdditionalLightData gAdditionalLights[XC_MAX_ADDITIONAL_LIGHTS];
};
#endif

View File

@@ -0,0 +1,9 @@
#ifndef XC_UNIVERSAL_SHADER_PASS_INCLUDED
#define XC_UNIVERSAL_SHADER_PASS_INCLUDED
#define XC_PASS_FORWARD_LIT "ForwardLit"
#define XC_PASS_DEPTH_ONLY "DepthOnly"
#define XC_PASS_SHADOW_CASTER "ShadowCaster"
#define XC_PASS_UNLIT "Unlit"
#endif

View File

@@ -0,0 +1,15 @@
#ifndef XC_UNIVERSAL_SURFACE_INPUT_INCLUDED
#define XC_UNIVERSAL_SURFACE_INPUT_INCLUDED
#include "Packages/com.xcengine.render-pipelines.core/ShaderLibrary/TextureSampling.hlsl"
#include "Packages/com.xcengine.render-pipelines.core/ShaderLibrary/ShaderVariables.hlsl"
Texture2D BaseColorTexture;
SamplerState LinearClampSampler;
float4 SampleBaseColor(float2 uv)
{
return SampleTexture2D(BaseColorTexture, LinearClampSampler, uv) * gBaseColorFactor;
}
#endif