18 lines
633 B
Plaintext
18 lines
633 B
Plaintext
#pragma kernel KMain
|
|
|
|
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch
|
|
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl"
|
|
|
|
TEXTURE2D_X(_InputTexture);
|
|
RW_TEXTURE2D_X(float, _OutputTexture);
|
|
|
|
[numthreads(8, 8, 1)]
|
|
void KMain(uint3 dispatchThreadId : SV_DispatchThreadID)
|
|
{
|
|
UNITY_XR_ASSIGN_VIEW_INDEX(dispatchThreadId.z);
|
|
float alpha = LOAD_TEXTURE2D_X(_InputTexture, dispatchThreadId.xy).w;
|
|
_OutputTexture[COORD_TEXTURE2D_X(dispatchThreadId.xy)] = alpha;
|
|
}
|