util-tonemap-and-downsample
This shader does a tonemap and 1D downsample of a texture, which is intended to be for the diffusion emulation in the CRT side of the whole Cathode Retro process.
It's worth noting that in practice it is not doing a true 2x downsample, it's going to be something in that ballpark, but not exact. However, the output of this shader is expected to be blurred so it doesn't actually matter in practice.
Index
Input Textures/Samplers
Uniform Buffer Values
Input Textures/Samplers
- g_sourceTexture
-
g_sourceTextureType
texture(platform-specific)Description
The texture to sample. - g_sampler
-
g_samplerType
sampler(platform-specific, does not exist on some platforms)Description
The sampler to use to sample g_sourceTexture.
Uniform Buffer Values
- g_downsampleDir
-
float2 g_downsampleDirType
float2Description
The direction that we're downsampling along. Should either be (1, 0)to downsample horizontally to a half-width texture or(0, 1)to downsample vertically to a half-height texture. - g_minLuminosity
-
float g_minLuminosityType
floatDescription
The minimum luminosity that will contribute to the output.
Values at or below this luminosity in the input texture will becomes black in the output texture.
Values above this value will be scaled down accordingly.
- g_colorPower
-
float g_colorPowerType
floatDescription
The power to take the output value to.