Skip to main content
gamedev.net
🔒 Locked

Combining Textures

Started by HippieHunter Feb 18, 2005 at 3:45 PM 3 replies 1.2k views
Original Post
HippieHunter
HippieHunter
Is there a way that i can combine two textures based on a third textures lookup, using PixelShaders of any version.
mikiex
mikiex
Explain more what your trying to do?
HippieHunter
HippieHunter
im using 3d Textures, as in each layer is a different texture. ie one layer for Grass one for Mud ect. thats the Primary texture, while the Secondary texture is textures for Roads and things like that. The 3rd texture is to be used as a key, with one color channel used to determine the layer of the 1st texture, one color channel used to determine the layer of the 2nd texture and the 3rd color channel to determine the ratio of blend between the two.
mikiex
mikiex
you can probably do what you want I think. Shaders are very flexible.
Although u might want to decide to do it in a different way to the one
your propose. I would check out what other people have done... for instance
a tarmac road might be better as seperate geometry due its nature.

btw 3d textures is the wrong name for what you want to do, maybe
detail textures and multi-texturing are what you want to look up.

I think you could do something like
Lerp grasstexture and roadtexture by mixtexture
maybe someone could provide you with a proper HLSL example of how its done.


HippieHunter
HippieHunter
Lerp was the response i was looking for thank you for your assistance

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.