from @GoldenThumbs: HDR editor bloom fix

This commit is contained in:
AzaezelX 2022-11-08 10:29:48 -06:00
parent 97eaab3f49
commit 22f9d54c0b
4 changed files with 4 additions and 4 deletions

View file

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

View file

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

View file

@ -97,7 +97,7 @@ void main()
{ {
vec4 _sample = hdrDecode( texture( sceneTex, IN_uv0 ) ); vec4 _sample = hdrDecode( texture( sceneTex, IN_uv0 ) );
float adaptedLum = texture( luminanceTex, vec2( 0.5f, 0.5f ) ).r; 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 ) ); float4 sample = hdrDecode( TORQUE_TEX2D( sceneTex, IN.uv0 ) );
float adaptedLum = TORQUE_TEX2D( luminanceTex, float2( 0.5f, 0.5f ) ).r; 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. // Add the bloom effect.
sample += bloom; sample += bloom;