Search Issue Tracker
By Design
Votes
15
Found in [Package]
10.0.0-preview.27
Issue ID
1267776
Regression
No
Graphics.Blit will not apply the Material over the whole GameObject when the Material uses HDRP or Shader Graph shader
How to reproduce:
1. Open the user's attached "Bugreport-Graphics.Blit" project
2. Open the "Scene" Scene
3. In the Hierarchy select the "Plane" GameObject
4. Enter the Play Mode
Expected results: The whole "Plane" GameObject becomes gray
Actual results: Only the corner of the "Plane" GameObject becomes gray
Reproducible with: 2019.3.0b5, 2019.4.8f1, 2020.1.3f1, 2020.2.0a21 (7.1.1, 10.0.0-preview.27)
Could not test with 2018.4.26f1 because of the CS0246 error, 2019.3.0b4 (HDRP 7.0.1) and lower because the shader would not apply
Notes:
- The issue occurs only with these shaders:
HDRP
HDRP Shader Graph
Shader Graph (when using either HDRP or URP. Built-in Render Pipeline does not support Shader Graph)
- Changing the ZTest to Always (or any other option) does not solve the issue
- Changing the Camera's Viewport does not solve the issue
- The issue has been tested and reproduced on Windows
Comments (1)
-
cr4y
Aug 26, 2020 16:24
Why is it in category "Package: SRP HD Template"?
I believe it should be "Package: ShaderGraph" instead, as it affects both Universal and HD Rendering Pipelines.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash on ResizeScriptingList<ScriptingObjectPtr> when passing an undeclared variable to the results parameter for GameObject.FindGameObjectsWithTag
- [Android] "Screen.safeArea.y" always returns values outside of the Safe Area when the device is in Portrait orientation
- Frame spike due to many TreeRenderer.TreeUpdated calls when repositioning terrains in large Scenes
- Crash on GameObject::RemoveComponentFromGameObjectInternal when reparenting Text GameObjects
- [IL2CPP-GarbageCollector] Changing GCMode might permanently disable GC in a multithreaded context
Resolution Note:
Using a ShaderGraph like this with a Blit is not supposed to work. All current HDRP shader graphs are intended for 3D objects in the scene. As such they apply camera and projection transformations to all vertices, making it unsuitable for 2D blits like this.
I suggest trying to use Custom Render Textures as they are much more suited for writing a brush painting tool: https://docs.unity3d.com/Manual/class-CustomRenderTexture.html
With scripting it is possible to generate strokes on specific part of a render texture.