IRCSS / TexturePaint

Painting directly in mesh textures in Unity 3d with shaders

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shader method not working on build

JWAOSTAR opened this issue · comments

I am working on building an application with a painting aspect. I wanted to speed up the rendering of pixels from a brush, and in my research stumbled on your shader method which in retrospect probably should have been more obvious to me. I was able to integrate you method with some of the code that I was writing and it worked fine in the editor but when I built out the project it doesn't seem like it can paint to the texture. Where there any of the default settings that need to be changed to the shader functionality. Thanks deeply for any response you can give.

Hi,
which platform did you build for? Here are some potential reasons why it might not work in build:

  1. The platform doesnt support compute shader.
  2. The camera event which the command buffer is attached to is not fired in build on that platform
  3. Some coordinate system is flipped in build compared to editor (for example the uv of the mesh is 0 to -1 or something)
    etc.
    My suggestion would be to debug with RenderDoc, and first see if the command buffers are even fired. If yes what texture is being outputed.

I am building a stand alone for Windows PC. Thanks for the suggestion, I will try that and see what I can figure out.

Thanks for your help, it turns out it was not a problem with the shader or anything on the graphics side. The colliders I was using didn't have read/write permissions enabled so on the build the model had no collider.