Sign in to follow this  
Halsafar

Texture Splatting Problem -- (1 color textures) - Screenshot

Recommended Posts

http://www.gamedev.net/columns/hardcore/splatting/ That article. I used the demo, and implimented the pixel shader and all the exact render states. I am using the exact same alphamap and textures all the in the same stages. Everything is as indentical as I can get it, and here is what mine looks like... Each texture seems to only come out as one color. I have no clue why. Edit: He is using DrawPrimitiveUP, I am using DrawIndexedPrimitive... Thats about the only difference.

Share this post


Link to post
Share on other sites
perhaps something wrong with the pixel shader, or the UV-coordinates of your vertices? If the alpha-map spans the whole plane, but you want your textures tiled, you should have 2 seperate UV-coordinate-sets. Or you could just multiply the alpha-map UV to get a tiling of the textures itself.

Share this post


Link to post
Share on other sites
[pure guess]
it isn't just as simple as being too far away? as the "zones" seem very rounded and nice I would guess he is far away thus the same texture gets mipmapped to a very low lever and the same color is just repeated over and over again? (if he is using (0,0)-(1,1) UV for each square)

just a pure guess from nowhere though.

Share this post


Link to post
Share on other sites
Actually that view was every triangle in a 513x513 heightmap with the Y values forced to 0.
The problem was indeed the PS was looking for a 2nd set of texture coords for the alpha map.
By including D3DFVF_TEX2 and adding a 2nd pair of tu, tv I fixed it.

Now I have a problem with alphamap resolution.

A one buffer terrain, the alphamap to texel ratio is about 1pixel/100texels.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this