- Home /
Transparent Shader performance, intermediate-advanced question?
So, I was thinking. For buildings, could you just use regular straight colors for brick, and apply (tiled to liking) a transparent diffuse, and normal map to shade and pop out detail, so that, for all buildings you really only need a few textures total?
Not sure if this would be worthwhile performance-wise or possible, as I havent toyed around with it yet... too busy right now :(
Anyway, if this works, it would be a cool trick.
is it possible that you just mean:
use one, perhaps large, texture for the bump -- and use that repeatedly -- and then use various textures for the brick paint?
so your point is (B) "ins$$anonymous$$d of having ten textures and ten bumps, just have ten textures and one bump" ..?
or are you further saying (C) "ins$$anonymous$$d of having ten textures and ten bumps, just have ten textures and one VERY SI$$anonymous$$PLE (eg tiny plain color) bump" ..?
if so, I think B is pretty common, yeah. with C, I$$anonymous$$O it would look kind of cheap I think (but sometimes that's great)
$$anonymous$$inda, I'm not sure if were thinking the same or not, but at least close. What I mean is, use the regular plain system colors(not texture of any kind) for the color of the brick, then add a small transparent texture that just has noise and brick shape shade, to darken around it, and seamlessly tile that, and THEN(lol), add a small normal map(created from that transparent texture), that pops out the bricks and the noise in the brick( or rather pops in). So all textures would be small, but tiling, and so you could scale these bricks and maybe use different variety transparent and normal map just to change things up. Whew! That was a lot.
Really, I am not a shader writer, but all that you describe sounds "totally normal, and exactly what everyone does all the time" ! :)
I think it's a case of you have cleverly "invented" a usual process -- so you should feel good about being so smart :)
note that what yous ay about colorising it is just what almost any shader does where there's a variable you can change the color (most of the standard shaders from Unity have this, just click in the inspector, all your'e doing is changing a "color" variable in the guts of the shader)
Ah! yes. So I can just have the transparent and normal, and set the color through the transparent. I haven't messed much with texturing in unity itself in a while. Been modeling so much in maya lately, ugh!...
but, would be nice if there was a place to find cool trickery tips like this! I am patting myself on the shoulder lol.
I suggest search here on on Google for "shaders" "color" "transparent" etc.