- Home /
Compute Shader and mipmaps auto-generation
Hello,
My initial goal is to use a R32 texture inside a custom shader. As Unity cannot import textures with more than 8 bit depth color as Texture2D, I used a Compute Shader to generate a RenderTexture from a RAW Photoshop file (thanks to this useful article http://scrawkblog.com/2013/06/27/encodedecode-floating-point-textures-in-unity).
Now I have a RenderTexture I can use as input for a custom shader. But... it has no mipmaps !? I tried using properties useMipMap and/or generateMips (can't find it in the doc but autocompletion displays it) without success.
The problem seems to be that these properties define if Unity will auto-generate mipmaps on the RenderTexture when "render into it". Unfortunately, writing into a RenderTexture through a compute shader doesn't seem to be consider as "render into it". Therefore I have no mipmaps generated. It is a pity because DirectCompute allows auto mipmaps generation on compute shaders operations, as far as I can understand.
Does somebody have any solution for this, except generating mipmaps myself in the compute shader?
Thanks for advance
Your answer
![](https://koobas.hobune.stream/wayback/20220613142744im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
DepthNormalsTexture access in Compute Shader 0 Answers
RenderTexture being wiped/changed on play or undo. 0 Answers
Alpha Problems With Render Textures 0 Answers
Graphics.Blit into lower MipLevel? 0 Answers