Search Issue Tracker
By Design
Votes
0
Found in
2021.3.31f1
2022.3.11f1
2023.1.17f1
2023.2.0b14
2023.3.0a10
Issue ID
UUM-55653
Regression
No
The same texture's Wrap Mode does not adjust when changing it through the code
Reproduction steps:
1. Open the attached “Test Project” project
2. Open the “Scenes/SampleScene” Scene
3. In the Game View window press “Load RenderDoc”
4. Enter the Play Mode
5. In the Game View window press the “Capture the current view and open in RenderDoc” button to open the “RenderDoc” window
6. Double-click on the newly captured capture
7. In the Event Browser window go to “UIR.DrawChain/Camera.Render/Drawing/Unnamed command buffer”
8. Select the first “DrawIndexed(6)” event
9. Open the “Pipeline State” tab and select the “PS” option
10. Observe the data in the Samplers window
Expected result: Under the “Addressing” column the value is set to “Wrap”
Actual result: The Wrap Mode change is ignored and under the “Addressing” column the value is set to “ClampEdge”
Reproducible with: 2021.3.31f1, 2022.3.11f1, 2023.1.17f1, 2023.2.0b14, 2023.3.0a10
Reproducible on: Windows 10
Not reproducible on: No other environment tested
Note:
- Texture’s wrap mode change is happening in “MyDrawer.cs” lines 72 and 78
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
- Too little validation messages in the "WebAssembly Language Features" Memory settings
- Project Settings Search Highlights are misaligned when using the Bitmap Text Rendering Mode
- "GetControlID at event ValidateCommand returns a controlID different from the one in Layout event" Warning is thrown when undoing the deletion of Sprite Shape Profile
- Memory related fields in the "WebAssembly Language Features" can be set to the negative numbers
- "WebAssembly Language Features" Header in the Player Settings has a smaller indentation
Resolution Note:
"Texture.wrapMode" is, in this case, working as intended.
The API doesn't record a command into the CommandBuffer, hence the texture's use of the last TextureWrapMode set during Start().
A new "CommandBuffer.SetTextureWrapMode" API would help in this case, as it would allow "Set TextureWrapMode to X on A" commands to be recorded into the CommandBuffer.
We have not received feedback/a feature request for something like the above before: our recommendation, in case workarounds are proving to be too inefficient, would be to provide us with feedback (See "How to check the roadmap and provide feedback": https://forum.unity.com/threads/how-to-check-roadmap-and-provide-feedback.1321341/) so that we may prioritise appropriately.