diff --git a/WickedEngine/Renderable3DComponent.cpp b/WickedEngine/Renderable3DComponent.cpp index 98ce81ad9..e1db68fcd 100644 --- a/WickedEngine/Renderable3DComponent.cpp +++ b/WickedEngine/Renderable3DComponent.cpp @@ -436,11 +436,12 @@ void Renderable3DComponent::RenderComposition2(GRAPHICSTHREAD threadID){ } rtFinal[2].Activate(threadID); - fx.process.setFXAA(true); + fx.process.setFXAA(getFXAAEnabled()); if (getDepthOfFieldEnabled()) wiImage::Draw(rtDof[2].GetTexture(), fx, threadID); else wiImage::Draw(rtFinal[1].GetTexture(), fx, threadID); + fx.process.clear(); if (getBloomEnabled()) { diff --git a/WickedEngine/objectHF.hlsli b/WickedEngine/objectHF.hlsli index de52cc975..7ec7119d6 100644 --- a/WickedEngine/objectHF.hlsli +++ b/WickedEngine/objectHF.hlsli @@ -62,11 +62,6 @@ struct GBUFFEROutputType // METHODS //////////// -//inline void BaseColorMapping(in float2 UV, inout float4 baseColor) -//{ -// baseColor *= xBaseColorMap.Sample(sampler_aniso_wrap, UV); -//} - inline void NormalMapping(in float2 UV, in float3 V, inout float3 N, inout float3 bumpColor) { float4 nortex = xNormalMap.Sample(sampler_aniso_wrap, UV); @@ -105,8 +100,6 @@ inline void DirectionalLight(in float3 N, in float3 V, in float3 P, in float3 f0 diffuse *= sh; specular *= sh; - specular += EnvironmentReflection(N, V, P, roughness, f0); - diffuse = max(diffuse, 0); specular = max(specular, 0); } @@ -166,6 +159,10 @@ inline void DirectionalLight(in float3 N, in float3 V, in float3 P, in float3 f0 //#define OBJECT_PS_PLANARREFLECTIONS \ // PlanarReflection(input.tex, refUV, N, color); +#define OBJECT_PS_ENVIRONMENTREFLECTIONS \ + specular += EnvironmentReflection(N, V, P, roughness, f0); + + #define OBJECT_PS_REFRACTION \ Refraction(ScreenCoord, input.nor2D, bumpColor, color.a, albedo); @@ -180,7 +177,6 @@ inline void DirectionalLight(in float3 N, in float3 V, in float3 P, in float3 f0 #define OBJECT_PS_OUT_GBUFFER \ GBUFFEROutputType Out = (GBUFFEROutputType)0; \ - /*N = mul(N.xyz, (float3x3)g_xCamera_View);*/ \ Out.g0 = float4(color.rgb, 1); /*FORMAT_R8G8B8A8_UNORM*/ \ Out.g1 = float4(encode(N), 0, 0); /*FORMAT_R16G16_FLOAT*/ \ Out.g2 = float4(velocity * 0.5f + 0.5f, sss, emissive); /*FORMAT_R8G8B8A8_UNORM*/ \ diff --git a/WickedEngine/objectPS_forwardSimple.hlsl b/WickedEngine/objectPS_forwardSimple.hlsl index ccfa78a18..142755de3 100644 --- a/WickedEngine/objectPS_forwardSimple.hlsl +++ b/WickedEngine/objectPS_forwardSimple.hlsl @@ -15,6 +15,8 @@ float4 main(PixelInputType input) : SV_TARGET OBJECT_PS_LIGHT_DIRECTIONAL + OBJECT_PS_ENVIRONMENTREFLECTIONS + OBJECT_PS_LIGHT_END OBJECT_PS_EMISSIVE diff --git a/WickedEngine/objectPS_transparent.hlsl b/WickedEngine/objectPS_transparent.hlsl index cdc8b7440..65d4225c1 100644 --- a/WickedEngine/objectPS_transparent.hlsl +++ b/WickedEngine/objectPS_transparent.hlsl @@ -16,6 +16,8 @@ float4 main( PixelInputType input) : SV_TARGET OBJECT_PS_LIGHT_DIRECTIONAL + OBJECT_PS_ENVIRONMENTREFLECTIONS + OBJECT_PS_LIGHT_END OBJECT_PS_EMISSIVE diff --git a/WickedEngine/wiVersion.cpp b/WickedEngine/wiVersion.cpp index 6506c7cf2..918c96670 100644 --- a/WickedEngine/wiVersion.cpp +++ b/WickedEngine/wiVersion.cpp @@ -7,7 +7,7 @@ namespace wiVersion // minor features, major bug fixes const int minor = 8; // minor bug fixes, alterations, refactors - const int revision = 2; + const int revision = 8; long GetVersion()