From cbca17825614d18a96994c94ec0c38e9d8e812cf Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Sat, 24 Aug 2024 00:55:32 -0400 Subject: Add Contrast Adaptive Sharpening post process effect(#2399) --- indra/newview/pipeline.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/pipeline.h') diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index 024303d5f0..a58b7850ea 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -157,6 +157,7 @@ public: void generateExposure(LLRenderTarget* src, LLRenderTarget* dst, bool use_history = true); void gammaCorrect(LLRenderTarget* src, LLRenderTarget* dst); void generateGlow(LLRenderTarget* src); + void applyCAS(LLRenderTarget* src, LLRenderTarget* dst); void applyFXAA(LLRenderTarget* src, LLRenderTarget* dst); void renderDoF(LLRenderTarget* src, LLRenderTarget* dst); void copyRenderTarget(LLRenderTarget* src, LLRenderTarget* dst); @@ -1067,6 +1068,7 @@ public: static bool RenderMirrors; static S32 RenderHeroProbeUpdateRate; static S32 RenderHeroProbeConservativeUpdateMultiplier; + static F32 RenderCASSharpness; }; void render_bbox(const LLVector3 &min, const LLVector3 &max); -- cgit v1.2.3 From ca115671d6310798ac512a9a6baa71a06f14e9ce Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Mon, 26 Aug 2024 15:42:57 -0400 Subject: Replaced refreshCachedSetting for sharpening with cached control --- indra/newview/pipeline.h | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/pipeline.h') diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index a58b7850ea..1c87b71d06 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -1068,7 +1068,6 @@ public: static bool RenderMirrors; static S32 RenderHeroProbeUpdateRate; static S32 RenderHeroProbeConservativeUpdateMultiplier; - static F32 RenderCASSharpness; }; void render_bbox(const LLVector3 &min, const LLVector3 &max); -- cgit v1.2.3 From 958afaa7a7bfb1217bbffee3fe562f21901277ac Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Tue, 27 Aug 2024 22:47:32 -0400 Subject: Integrate SMAA and rework post process chain for better visual quality Add SMAA buffer generation passes Add quality levels for both FXAA and SMAA Separate gamma correction and tonemapping for effects that require linear-but-tonemapped inputs Move application of noise to final render pass to screen to avoid damaging other post process effects --- indra/newview/pipeline.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'indra/newview/pipeline.h') diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index 1c87b71d06..3687ab32fa 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -129,7 +129,7 @@ public: //attempt to allocate screen buffers at resX, resY //returns true if allocation successful, false otherwise - bool allocateScreenBuffer(U32 resX, U32 resY, U32 samples); + bool allocateScreenBufferInternal(U32 resX, U32 resY); bool allocateShadowBuffer(U32 resX, U32 resY); // rebuild all LLVOVolume render batches @@ -155,10 +155,13 @@ public: void copyScreenSpaceReflections(LLRenderTarget* src, LLRenderTarget* dst); void generateLuminance(LLRenderTarget* src, LLRenderTarget* dst); void generateExposure(LLRenderTarget* src, LLRenderTarget* dst, bool use_history = true); + void tonemap(LLRenderTarget* src, LLRenderTarget* dst); void gammaCorrect(LLRenderTarget* src, LLRenderTarget* dst); void generateGlow(LLRenderTarget* src); void applyCAS(LLRenderTarget* src, LLRenderTarget* dst); void applyFXAA(LLRenderTarget* src, LLRenderTarget* dst); + void generateSMAABuffers(LLRenderTarget* src); + void applySMAA(LLRenderTarget* src, LLRenderTarget* dst); void renderDoF(LLRenderTarget* src, LLRenderTarget* dst); void copyRenderTarget(LLRenderTarget* src, LLRenderTarget* dst); void combineGlow(LLRenderTarget* src, LLRenderTarget* dst); @@ -726,6 +729,7 @@ public: // FXAA helper target LLRenderTarget mFXAAMap; + LLRenderTarget mSMAABlendBuffer; // render ui to buffer target LLRenderTarget mUIScreen; @@ -782,6 +786,11 @@ public: U32 mTrueNoiseMap; U32 mLightFunc; + //smaa + U32 mSMAAAreaMap = 0; + U32 mSMAASearchMap = 0; + U32 mSMAASampleMap = 0; + LLColor4 mSunDiffuse; LLColor4 mMoonDiffuse; LLVector4 mSunDir; @@ -989,7 +998,7 @@ public: static bool WindLightUseAtmosShaders; static bool RenderDeferred; static F32 RenderDeferredSunWash; - static U32 RenderFSAASamples; + static U32 RenderFSAAType; static U32 RenderResolutionDivisor; static bool RenderUIBuffer; static S32 RenderShadowDetail; -- cgit v1.2.3 From b713f56d07cffb21cad5928bf30d6d4b6dc79de9 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Thu, 12 Sep 2024 09:22:10 -0700 Subject: Replace glh_linear usage with GLM (#2554) --- indra/newview/pipeline.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'indra/newview/pipeline.h') diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index 3687ab32fa..a3ecab3208 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -345,7 +345,7 @@ public: void renderHighlight(const LLViewerObject* obj, F32 fade); - void renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera& camera, LLCullResult& result, bool depth_clamp); + void renderShadow(const glm::mat4& view, const glm::mat4& proj, LLCamera& camera, LLCullResult& result, bool depth_clamp); void renderSelectedFaces(const LLColor4& color); void renderHighlights(); void renderDebug(); @@ -760,10 +760,10 @@ public: LLCamera mShadowCamera[8]; LLVector3 mShadowExtents[4][2]; // TODO : separate Sun Shadow and Spot Shadow matrices - glh::matrix4f mSunShadowMatrix[6]; - glh::matrix4f mShadowModelview[6]; - glh::matrix4f mShadowProjection[6]; - glh::matrix4f mReflectionModelView; + glm::mat4 mSunShadowMatrix[6]; + glm::mat4 mShadowModelview[6]; + glm::mat4 mShadowProjection[6]; + glm::mat4 mReflectionModelView; LLPointer mShadowSpotLight[2]; F32 mSpotLightFade[2]; -- cgit v1.2.3 From 85a7020e4903e83701c3f1ccbc9a14bd84c9368b Mon Sep 17 00:00:00 2001 From: Rye Cogtail Date: Fri, 13 Sep 2024 16:26:23 -0400 Subject: Raise resolution of local baked texture preview from 512 to 2048 --- indra/newview/pipeline.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/newview/pipeline.h') diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index a3ecab3208..5c9b95ef4a 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -737,6 +737,9 @@ public: // downres scratch space for GPU downscaling of textures LLRenderTarget mDownResMap; + // 2k bom scratch target + LLRenderTarget mBakeMap; + LLCullResult mSky; LLCullResult mReflectedObjects; LLCullResult mRefractedObjects; @@ -776,7 +779,7 @@ public: //water distortion texture (refraction) LLRenderTarget mWaterDis; - static const U32 MAX_BAKE_WIDTH; + static const U32 MAX_PREVIEW_WIDTH; //texture for making the glow LLRenderTarget mGlow[3]; -- cgit v1.2.3