16 lines
298 B
Plaintext
16 lines
298 B
Plaintext
#pragma kernel cs_main
|
|
|
|
// The output texture
|
|
RWTexture2D<float4> result;
|
|
|
|
// Input texture
|
|
Texture2D<float4> source_texture;
|
|
|
|
[numthreads(8, 8, 1)]
|
|
void cs_main(uint3 id : SV_DispatchThreadID)
|
|
{
|
|
float4 color = source_texture[id.xy];
|
|
color.rgb = 1 - color.rgb;
|
|
result[id.xy] = color;
|
|
}
|