Add gaussian splat asset caching groundwork
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
Shader "Builtin Gaussian Splat Composite"
|
||||
{
|
||||
SubShader
|
||||
{
|
||||
Pass
|
||||
{
|
||||
Name "GaussianComposite"
|
||||
Tags { "LightMode" = "GaussianComposite" }
|
||||
Cull Off
|
||||
ZWrite Off
|
||||
ZTest Always
|
||||
Blend One OneMinusSrcAlpha
|
||||
HLSLPROGRAM
|
||||
#pragma target 4.5
|
||||
#pragma vertex MainVS
|
||||
#pragma fragment MainPS
|
||||
|
||||
Texture2D GaussianSplatAccumulationTexture;
|
||||
|
||||
struct VSOutput
|
||||
{
|
||||
float4 position : SV_POSITION;
|
||||
};
|
||||
|
||||
VSOutput MainVS(uint vertexId : SV_VertexID)
|
||||
{
|
||||
const float2 positions[3] = {
|
||||
float2(-1.0f, -1.0f),
|
||||
float2(-1.0f, 3.0f),
|
||||
float2( 3.0f, -1.0f)
|
||||
};
|
||||
|
||||
VSOutput output;
|
||||
output.position = float4(positions[vertexId], 1.0f, 1.0f);
|
||||
return output;
|
||||
}
|
||||
|
||||
float4 MainPS(VSOutput input) : SV_TARGET
|
||||
{
|
||||
const int2 pixelCoord = int2(input.position.xy);
|
||||
return GaussianSplatAccumulationTexture.Load(int3(pixelCoord, 0));
|
||||
}
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user