Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render Graph (Unity 6) #23

Open
lukakldiashvili opened this issue Nov 9, 2024 · 6 comments
Open

Render Graph (Unity 6) #23

lukakldiashvili opened this issue Nov 9, 2024 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@lukakldiashvili
Copy link
Owner

Development Branch: feature/render-graph

To test, download repository as zip and move contents into the project OR add as a upm package using: https://github.com/lukakldiashvili/Unified-Universal-Blur.git#feature/render-graph

This issue serves as the main place to discuss initial implementation and issues of the Render Graph-based blur feature.

Feel free to test and leave feedback here.

Here is a short list of resources I used:

@lukakldiashvili
Copy link
Owner Author

lukakldiashvili commented Nov 9, 2024

Currently known issues on the branch includes:

  • Color bleeding from the opposite ends on the edges (seemingly not caused by wrapMode or UV reads)
    Update: Solution found - change sampler_LinearRepeat in the shader code to sampler_LinearClamp
  • Allocations caused by MaterialPropertyBlocks (my first instinct was to try using RenderGraphObjectPool.GetTempMaterialPropertyBlock, which the current graph setup does not allow. But, I will implement manual caching if I cannot find a better alternative)

@matyX6
Copy link
Contributor

matyX6 commented Nov 10, 2024

I have just tried out this branch, and honestly I haven't found a single issue you have not already mentioned.

Both color bleeding and allocations are present in my project as well... Tried to cache material property block variable just to compare performance results with the old API, and it mostly stayed the same.

Also, I tested this on Windows and Mac, both in editor and build. The result was pretty consistent with the older builds. The scaling feature is still working, blur also scales with URP render scale.

It feels like this migration is already successfull. Except for the problems you mentioned, blur basically behaves the same. Thank you for your work 🤘

@lukakldiashvili
Copy link
Owner Author

@matyX6 Thank you for thorough testing! Fortunately, I have found a simple solution for color bleeding already (updated my previous comment).

As for the MaterialPropertyBlocks, I am experimenting now with a little bit more manual implementation of the render pass. Once it is done, I am going to compare if extra complexity is worth it.

@lukakldiashvili lukakldiashvili changed the title Render Graph Refactor (Unity 6) Render Graph (Unity 6) Nov 12, 2024
@matyX6
Copy link
Contributor

matyX6 commented Nov 17, 2024

Hope that this one is still a place to leave feedback... Updated my project with new 0.6.0 version from main... Nice, as you said in previous comment you already have solutions in the sleeve, both problems we discussed earlier are obviously fixed.

I have to admit that what you did with Readme file is fire! Great job, new graphics there and nicer description leveled up this package. Looking good and of high quality.

Everything is cool. I also like how you handeled legacy code being on separate branch for easier access than letting it on mains history.

Other than this little warning that pops out I will post in separate comment, great job! I will run this version in my project, so if I'll be able to give more feedback in the future, I'll be glad. Cheers!

@matyX6
Copy link
Contributor

matyX6 commented Nov 17, 2024

Warning i mentioned in previous comment:

Shader warning in 'Unify/Internal/Blur': 'KawaseBlur': implicit truncation of vector type at Packages/com.unify.unified-universal-blur/Shaders/Blur.shader(54) (on d3d11)

Compiling Subshader: 0, Pass: Fast - Kawase, Vertex program with <no keywords> Platform defines: SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_PBS_USE_BRDF1 UNITY_PLATFORM_SUPPORTS_DEPTH_FETCH UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS Disabled keywords: SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_VIRTUAL_TEXTURING

@lukakldiashvili
Copy link
Owner Author

@matyX6 Thank you for the kind words!
I will take a look at the warning. It should be a quick fix.

I will close this issue soon, probably. It is better to have each problem as a standalone issue anyways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants