Jump to content
Posted 22 September 2012 - 05:34 AM
Posted 22 September 2012 - 06:47 AM
Posted 22 September 2012 - 06:59 AM
Posted 22 September 2012 - 07:00 AM
Edited by Waaayoff, 22 September 2012 - 07:03 AM.
Posted 22 September 2012 - 07:11 AM
Edited by GeneralQuery, 22 September 2012 - 07:15 AM.
Posted 22 September 2012 - 07:26 AM
Posted 22 September 2012 - 07:31 AM
So basically just add more alpha maps/weight channels?
Posted 22 September 2012 - 07:37 AM
Posted 22 September 2012 - 07:44 AM
Texture splatting is an insalenly efficient technique on modern hardware, it's basically few texture samples and LERPs per fragment. You could bake a low resolution colour texture based on your splat weights for distance stuff but I'm not convinced it's worth the time, effort and resources for marginal performance gains (if any at all, or even worse perforance!).
I'm painting the terrain in my editor so no procedural stuff. I guess i'll just add more channels then.
As a side not, wouldn't it be better performance wise to use splatting only on chunks closer to the camera and some other technique on farther ones?
Edited by GeneralQuery, 22 September 2012 - 07:46 AM.
Posted 22 September 2012 - 08:10 AM
Posted 22 September 2012 - 08:36 AM
I'll stick to texture splatting then.
One last question. I'm not sure what the colour mask is used for?
Vector4 maskGrass(0.0, 0.0, 1.0, 0.0); // Mask out the red, blue and alpha colour channels, leaving only the green channel UInt idxGrass = 1; // 2nd element of weight array texture SomeAPI.SetShaderUniforms(rgbaMask = maskGrass, texElement = idxGrass); // shader code vec3 uvCoords = vec3(FragCoords, texElement); vec4 w= sampler2DArray(Weights, uvCoords) * rgbaMask; // Will leave us with the vector [0, 0, green, 0] float weight = w.x + w.y + w.z + w.w; // Will leave us with just the green channel lerp(a, b, weight); // splat our textures using the calculated blend weight for this material
Edited by GeneralQuery, 22 September 2012 - 08:39 AM.