Browse Source

Merge pull request #919 from Azaezel/alpha402/HDR_Fix

from @GoldenThumbs: HDR editor bloom fix
Brian Roberts 2 years ago
parent
commit
f0206120dc

+ 1 - 1
Templates/BaseGame/game/core/postFX/scripts/HDR/HDR_Bloom/upSampleP.glsl

@@ -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;
   }
   

+ 1 - 1
Templates/BaseGame/game/core/postFX/scripts/HDR/HDR_Bloom/upSampleP.hlsl

@@ -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;
   }
   

+ 1 - 1
Templates/BaseGame/game/core/postFX/scripts/HDR/HDR_finalPass.glsl

@@ -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 );
 
    
         	    

+ 1 - 1
Templates/BaseGame/game/core/postFX/scripts/HDR/HDR_finalPass.hlsl

@@ -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;