Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

How to do texture splatting in GPU clipmap terrian?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Waaayoff   Members   -  Reputation: 345

Like
0Likes
Like

Posted 25 June 2012 - 01:02 PM

I'm not really sure how that would work...
"Spending your life waiting for the messiah to come save the world is like waiting around for the straight piece to come in Tetris...even if it comes, by that time you've accumulated a mountain of shit so high that you're fucked no matter what you do. "

Ad:

#2 BCullis   Members   -  Reputation: 1669

Like
0Likes
Like

Posted 25 June 2012 - 01:31 PM

At least in my experience with them, splat maps are pretty much entirely a pixel shader process, whereas clipmaps are handled in the vertex shader. In this implementation of a clipmap, they only do shading in the pixel shader, so you could still dictate pre-shadowed color with splat maps.

Edited by BCullis, 25 June 2012 - 01:31 PM.

Hazard Pay :: FPS/RTS in SharpDX
DeviantArt :: Because right-brain needs love too

#3 Waaayoff   Members   -  Reputation: 345

Like
0Likes
Like

Posted 25 June 2012 - 01:42 PM

But texture splatting relies on dividing the terrain into chunks where every chunk has its own set of alpha maps. That wouldn't work with the way clipmaps are rendered..
"Spending your life waiting for the messiah to come save the world is like waiting around for the straight piece to come in Tetris...even if it comes, by that time you've accumulated a mountain of shit so high that you're fucked no matter what you do. "

#4 BCullis   Members   -  Reputation: 1669

Like
0Likes
Like

Posted 25 June 2012 - 02:07 PM

What I think texture splatting refers to is not what you think it refers to, then. I use the 4 color channels of a splat map to set alpha on four additive textures. But my entire map has one large splat map, so the texture coords go from 0-1 across the whole map, instead of chunking (which just means I lose fidelity or have to accept broader texture assignment areas).

If you wanted to split the map up into chunks, you just need to procedurally create the splat-map texture coordinate values for the vertices that are built, recognize when said vertices are generated which "chunk" they would fall into given the terrain mesh as a whole is a fixed size, and sample their color off that chunk's alpha maps. Perhaps in the vertex shader, you can create a new float4 that carries splat U, splat V, and chunk-grid coordinate X and Y, and pass that into the pixel shader?
Hazard Pay :: FPS/RTS in SharpDX
DeviantArt :: Because right-brain needs love too




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS