Merge pull request #919 from Azaezel/alpha402/HDR_Fix

from @GoldenThumbs: HDR editor bloom fix
This commit is contained in:
Brian Roberts 2022-11-10 01:56:02 -06:00 committed by GitHub
commit f0206120dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View file

@ -57,7 +57,7 @@ void main()
vec3 offsetWeight = KERNEL[i];
vec2 offsetXY = offsetWeight.xy * oneOverTargetSize * filterRadius;
float weight = offsetWeight.z;
vec4 sampleCol = texture(mipTex, IN_uv0 + offsetXY);
vec4 sampleCol = texture(mipTex, IN_uv1 + offsetXY);
upSample += sampleCol * weight;
}

View file

@ -52,7 +52,7 @@ float4 main(PFXVertToPix IN) : TORQUE_TARGET0
float3 offsetWeight = KERNEL[i];
float2 offset = offsetWeight.xy * oneOverTargetSize * filterRadius;
float weight = offsetWeight.z;
float4 sampleCol = TORQUE_TEX2D(mipTex, IN.uv0 + offset);
float4 sampleCol = TORQUE_TEX2D(mipTex, IN.uv1 + offset);
upSample += sampleCol * weight;
}

View file

@ -97,7 +97,7 @@ void main()
{
vec4 _sample = hdrDecode( texture( sceneTex, IN_uv0 ) );
float adaptedLum = texture( luminanceTex, vec2( 0.5f, 0.5f ) ).r;
vec4 bloom = texture( bloomTex, IN_uv0 );
vec4 bloom = texture( bloomTex, IN_uv2 );

View file

@ -92,7 +92,7 @@ float4 main( PFXVertToPix IN ) : TORQUE_TARGET0
{
float4 sample = hdrDecode( TORQUE_TEX2D( sceneTex, IN.uv0 ) );
float adaptedLum = TORQUE_TEX2D( luminanceTex, float2( 0.5f, 0.5f ) ).r;
float4 bloom = TORQUE_TEX2D( bloomTex, IN.uv0 );
float4 bloom = TORQUE_TEX2D( bloomTex, IN.uv2 );
// Add the bloom effect.
sample += bloom;