I am trying to learn more about graphics programming but I can't learn it just by staring at it so I have a question.
In the enbbloom.fx file there is a section of code that I think is used to sample the image and downscale it to smaller size.
Code: Select all
const float2 offset[4]=
{
float2(0.5, 0.5),
float2(0.5, -0.5),
float2(-0.5, 0.5),
float2(-0.5, -0.5)
};
Code: Select all
for (int i=0; i<4; i++)
{
bloomuv.xy=offset[i];
bloomuv.xy=(bloomuv.xy*screenfact.xy)+In.txcoord0.xy;
float4 tempbloom=tex2D(SamplerBloom1, bloomuv.xy);
bloom.xyz+=tempbloom.xyz;
}
Is that code taking the original image (blue-ish color) and re sizing it to the smaller red-ish box?
Is that the size of the end texture used for bloom?
As I said, I know very little of programming and this may make no sense at all.