Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- The issue you're describing, where textures and text appear blurry in Full HD (FHD, 1920x1080) compared to Ultra HD (UHD, 3840x2160) in a Unity project using the Universal Render Pipeline (URP), likely stems from a combination of factors related to resolution, scaling, and how URP handles rendering. The fact that a 0.5 render scale in UHD looks clearer than FHD suggests that the issue may be tied to specific settings in URP, texture sampling, or anti-aliasing/post-processing. Below, I'll outline potential causes and steps to diagnose and resolve the issue.
- ### Key Areas to Investigate
- 1. **Anti-Aliasing (AA) Settings in URP**
- - URP's anti-aliasing (e.g., FXAA, SMAA, or TAA) can cause blurriness, especially at lower resolutions like FHD, as these methods smooth out edges but may overly soften fine details like text or thin contour lines.
- - **Action**: Check the URP Asset settings (found in the Project window under your URP pipeline asset):
- - Go to the URP Asset (e.g., `UniversalRenderPipelineAsset`).
- - Look under the "Quality" section for **Anti-Aliasing (MSAA)** or **Post-Processing** settings.
- - Try disabling anti-aliasing entirely or switching between FXAA, SMAA, or no AA to see if the blurriness reduces.
- - If using Temporal Anti-Aliasing (TAA), note that it can introduce significant blur for fine details, especially at lower resolutions. Test with TAA disabled.
- - **Test**: Compare FHD with AA disabled vs. UHD at 0.5 render scale. If FHD looks clearer without AA, this is likely the culprit.
- 2. **Render Scale and Resolution Scaling**
- - The render scale in URP (set in the URP Asset or via code) determines the internal rendering resolution before upscaling to the target resolution. A render scale of 0.5 in UHD (rendering at 1920x1080, upscaled to 3840x2160) looking clearer than native FHD suggests that the upscaling process in UHD preserves more detail than FHD's native rendering.
- - **Possible Issue**: The upscaling algorithm or texture sampling in FHD may be introducing artifacts or blurriness.
- - **Action**:
- - Check the **Render Scale** in the URP Asset (under "General" settings). Set it to 1.0 for both UHD and FHD to ensure no scaling artifacts.
- - In the Unity Editor, go to **Game View** and ensure the resolution is set to 1920x1080 (not "Free Aspect" or a scaled preview).
- - Test with **Dynamic Resolution** disabled if it's enabled, as it can dynamically adjust render scale and introduce inconsistencies.
- - **Test**: Set render scale to 1.0 for FHD and compare with UHD at 0.5. If FHD still looks blurry, the issue may lie elsewhere.
- 3. **Texture Settings and Mipmaps**
- - Even though you mentioned disabling mipmaps, ensure this is applied correctly, as mipmaps can cause blurriness at lower resolutions if lower-quality texture levels are sampled.
- - **Action**:
- - Select your textures in the Project window and verify:
- - **Mipmap Enabled** is unchecked.
- - **Filter Mode** is set to **Point** (no filtering) or **Bilinear** (less blurry than Trilinear).
- - **Aniso Level** is set to a higher value (e.g., 8 or 16) to improve texture clarity at grazing angles.
- - **Texture Compression** is set to a high-quality format (e.g., RGBA 32-bit or no compression) for critical textures like UI or text.
- - For text specifically, ensure you're using a high-resolution font atlas or a text rendering solution like TextMeshPro, which is optimized for clarity.
- - **Test**: Import a high-resolution texture (e.g., 4K) and compare its appearance in FHD vs. UHD. If it’s still blurry in FHD, the issue is likely not texture-related.
- 4. **Text Rendering (TextMeshPro or Legacy Text)**
- - Text appearing blurry in FHD suggests a problem with font rendering or scaling.
- - If using **TextMeshPro** (recommended for URP):
- - Ensure the font atlas resolution is high (e.g., 2048x2048 or higher).
- - In the TextMeshPro component, set **Rendering Mode** to **Sharp** (not Smooth) and enable **Extra Padding** for better clarity.
- - Check the **Canvas Scaler** settings in your UI:
- - Set the **Reference Resolution** to 1920x1080 for FHD.
- - Use **Scale With Screen Size** and ensure the scaling mode is appropriate (e.g., "Constant Pixel Size" for pixel-perfect text).
- - If using legacy Unity UI Text, switch to TextMeshPro, as legacy text is prone to blurriness at lower resolutions.
- - **Test**: Place a TextMeshPro text object in the scene and compare its appearance in FHD vs. UHD. Adjust font atlas size if needed.
- 5. **Post-Processing Effects**
- - Post-processing effects like bloom, motion blur, or depth of field can exacerbate blurriness, especially at lower resolutions where pixel density is lower.
- - **Action**:
- - Check the **Post-Processing Volume** in your scene (usually attached to the main camera or a global volume).
- - Disable effects like **Bloom**, **Depth of Field**, or **Motion Blur** one by one to identify if any are causing the issue.
- - If using **Ambient Occlusion**, ensure it’s not overly softening edges (try reducing intensity or disabling).
- - **Test**: Disable all post-processing effects in FHD and compare with UHD at 0.5 render scale. If FHD looks clearer, re-enable effects one at a time to pinpoint the culprit.
- 6. **Camera Settings and Clear Flags**
- - The camera’s rendering settings can affect clarity, especially if there’s a mismatch between the camera’s resolution and the output resolution.
- - **Action**:
- - Check the **Main Camera** settings:
- - Ensure **Clear Flags** is set to **Skybox** or **Solid Color** (not "Don’t Clear" or "Depth Only", which can cause artifacts).
- - Verify the **Viewport Rect** is set to full size (X: 0, Y: 0, W: 1, H: 1).
- - Ensure **Allow Dynamic Resolution** is disabled unless explicitly needed.
- - Check the **Output Texture** in the Camera settings to ensure it’s not rendering to a low-resolution render texture.
- - **Test**: Set the camera to render at native FHD (1920x1080) with no scaling and compare.
- 7. **Shader or Material Issues**
- - Some URP shaders, especially custom ones, may not handle lower resolutions well, leading to aliasing or blurriness in textures or contours.
- - **Action**:
- - Check the materials used for objects with thin contours or textures.
- - Ensure the shader is URP-compatible (e.g., `Universal Render Pipeline/Lit` or `Universal Render Pipeline/2D` for sprites).
- - If using custom shaders, verify that they don’t rely on screen-space derivatives or mipmapping that could degrade at lower resolutions.
- - **Test**: Swap the material of a blurry object with a simple URP/Lit shader and check if the issue persists.
- 8. **Build vs. Editor Comparison**
- - The Unity Editor’s Game View may not always reflect the exact output in a build, especially if the Game View is scaled or using a different aspect ratio.
- - **Action**:
- - Build the project for your target platform (e.g., Windows, Android) and test at both UHD and FHD resolutions.
- - In the Build Settings, ensure **Display Resolution Dialog** is enabled (or manually set the resolution to 1920x1080 for FHD).
- - Compare the build output with the Editor’s Game View at the same resolution.
- - **Test**: If the build looks clearer than the Editor in FHD, the issue may be related to Editor-specific scaling or preview settings.
- ### Diagnostic Steps
- To systematically identify where the blurriness is introduced:
- 1. **Create a Minimal Test Scene**:
- - Create a new scene with a single object (e.g., a textured quad or TextMeshPro text).
- - Use a high-resolution texture or font to eliminate texture-related issues.
- - Disable all post-processing and anti-aliasing in the URP Asset.
- 2. **Test Resolutions**:
- - In the Game View, toggle between 1920x1080 (FHD) and 3840x2160 (UHD) with render scale set to 1.0.
- - Compare with UHD at 0.5 render scale (effectively rendering at 1920x1080, upscaled).
- - Take screenshots and compare pixel-level details (e.g., thin contours or text edges).
- 3. **Enable/Disable Features**:
- - Disable post-processing, anti-aliasing, and dynamic resolution one at a time.
- - Test with a point-filtered texture (no mipmaps, no filtering) to rule out texture sampling issues.
- - If text is blurry, focus on TextMeshPro settings and Canvas Scaler.
- 4. **Check Build Output**:
- - Build the project and test on a monitor or device that supports both FHD and UHD.
- - Ensure the display is set to the native resolution (e.g., 1920x1080 for FHD).
- ### Likely Culprit
- Given that UHD at 0.5 render scale (effectively rendering at FHD resolution) looks clearer than native FHD, the issue is likely related to:
- - **Anti-Aliasing**: FXAA or TAA smoothing out fine details too aggressively in FHD.
- - **Post-Processing**: Effects like bloom or ambient occlusion softening edges at lower resolutions.
- - **Texture Sampling**: Subtle differences in how Unity samples textures or fonts at native FHD vs. upscaled UHD.
- ### Recommended Fixes
- - **Disable Anti-Aliasing** or switch to SMAA (less blurry than FXAA or TAA).
- - **Set Render Scale to 1.0** for both FHD and UHD to avoid scaling artifacts.
- - **Use TextMeshPro** for text with a high-resolution font atlas and sharp rendering mode.
- - **Disable Post-Processing Effects** temporarily to isolate the issue.
- - **Ensure Textures Use Point Filtering** for critical assets like UI or thin contours.
- ### Additional Notes
- - If the issue persists, consider sharing screenshots of FHD vs. UHD (or UHD at 0.5 render scale) to better diagnose the problem visually.
- - Check the **Player Settings** (under Edit > Project Settings > Player) for resolution and presentation settings, especially if targeting specific platforms.
- - If you’re using a custom display setup (e.g., multiple monitors or a non-standard DPI), ensure the OS scaling (e.g., Windows Display Scaling) isn’t interfering with Unity’s output.
- If you’ve tried these steps and the issue remains, let me know more details about your setup (e.g., specific URP version, post-processing stack, or whether this is in Editor or a build), and I can refine the suggestions further.
Advertisement
Add Comment
Please, Sign In to add comment