unity-texture-tool icon indicating copy to clipboard operation
unity-texture-tool copied to clipboard

Glitched Shaders on Mac

Open ddutchie opened this issue 9 years ago • 8 comments

This tool does not seem to work correctly on a mac. The height map is generated correctly and blur works, however after that all textures are glitched.

Is there a reason you are using shaders and not scripts to convert your initial input.

ddutchie avatar Apr 09 '15 12:04 ddutchie

I think I have a mac here I can test with. If not, what do the glitched textures look like? I'm using shaders because it is much faster than processing the textures on the CPU.

vatara avatar Apr 09 '15 14:04 vatara

I made a change to one of the shaders(f474197549c5fd08d67e1b2b1ea990712ce93b3f), see if that fixes it. It's working now on my Mac here.

vatara avatar Apr 09 '15 19:04 vatara

Latest branch does not generate Normals correctly on my mac. (have not tested on windows)

i had to un-comment the top commented line in the (normal) shader for it to work. I am just finishing up my own project and will then look at yours in depth. I have been using scripts and readpixels to generate my various channels. I will be using your project to transition into a shader based approach.

Thanks again for this.

ddutchie avatar May 05 '15 14:05 ddutchie

You're referring to this line?

return float4((up - down).xxx, 1);

If you return that, you're only comparing the vertical difference and not horizontal. What does the output look like with my current version?

vatara avatar May 05 '15 17:05 vatara

It looks like the Metallic Map

ddutchie avatar May 06 '15 15:05 ddutchie

sorry i was recalling from my head, this is correct for mac

return float4(normal.x, normal.y, normal.z, 1);

ddutchie avatar May 06 '15 16:05 ddutchie

normal is still strange. will report back

ddutchie avatar May 07 '15 07:05 ddutchie

Normal seem to generate correctly, but in editor the error is that the texture is not assigned as normal map.

ddutchie avatar May 07 '15 08:05 ddutchie