|
I'm not good with shaders. Can someone tell me how I would take the skin shader below (from the wiki) and make the specular map be a separate texture instead of getting it from the alpha of the MainTex? I'm loading textures from the user's hard drive and since Unity can't load a DDS or anything with an actual alpha channel (unless I use an asset pack but user's can't make those) I need to use a separate texture as the spec map. Thanks in advance!
(comments are locked)
|
|
Not sure how to fix your shader (sorry about that), but unity can load TGA files at editor time and runtime easily enough, and they have a separate alpha channel I tried to load a TGA last night with no luck. Also on the texture format page in the docs it says it can load only PNG and JPG out of the box. I'll look around though and see if someone has written a TGA importer.
Jul 06 '10 at 06:02 PM
Ony
I'd prefer to have it load up ARGB DDS textures but TGA will do also if I can only find a way to import them on the fly.
Jul 06 '10 at 06:09 PM
Ony
PNG's support alpha channel, so what's the problem?
Jul 07 '10 at 04:53 PM
skovacs1
I would really like to know how to do this as well, I have tried Alpha on a PNG and I have not had any success.
Jul 29 '10 at 02:52 AM
w1nterl0ng
(comments are locked)
|
|
Unity can load graphics at runtime (which I assume is what you're talking about) with alpha channels from any format as long as you can code/find an importer for it. Yeah I'm going to look for some sort of importer I suppose. If I can find one then I don't have to worry about changing the shader code.
Jul 06 '10 at 06:03 PM
Ony
(comments are locked)
|

Unity can import DDS files with alpha channels. Search this site, and just drag a .dds into your project. Obviously, import settings for these will be disabled. I might be that not all .dds variants can be interpreted, but I'm not usre about that.
I'm talking about loading the DDS at runtime from the user's hard drive. I know Unity can load DDS into the project, I do it all the time, but that's not what I need here.