mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
Merge pull request #919 from Azaezel/alpha402/HDR_Fix
from @GoldenThumbs: HDR editor bloom fix
This commit is contained in:
commit
f0206120dc
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue