Quantcast
Channel: Questions in topic: "compute shader"
Viewing all articles
Browse latest Browse all 287

How to Update UI.Image for compute shaders?

$
0
0
So I've dove into some Compute Shaders because it's definitely better way to render anything you can think of - which for me is trying to render Voxels without dealing with polygons. Here's a quick example of where I am at https://www.youtube.com/watch?v=Oxo22vWgzKc - but I have an issue **when I try to apply Unlit-Texture shader/material on an Image. The Image is completely still and only changes when Updated. Even though Image Material's texture (the main Custom Shader's display/output) is constantly changing - it doesn't force an update** / **Is there some simple way to update a UI.Image every frame ?** / Experiments: * `Canvas.ForceUpdateCanvases` - doesn't update * `image.color` - doesn't update through code - works through inspector * `image.raycastTarget` - doesn't update through code - works through inspector * `im.sprite = ScriptHelper.SpriteCreate(Texture2D.whiteTexture); im.sprite = null;` - WORKS in code! (ScriptHelper is a substitute for Sprite.Create) **So if anyone continues my little experiment or knows something that may update the UI.Image - let me know.**

Viewing all articles
Browse latest Browse all 287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>