We're starting off with this texture, which is clamped.
With the following setup, you'll scale the texture from the visual centre of the material:
What is happening exactly?
First we subtract 0.5,0.5 to our texture coordinates. We're shifting the texture and bringing 0,0 to the centre.
Then we scale it.
Finally we add 0.5, 0.5 to bring the texture back to the original position. Simple :)
A screenshot won't tell you much about it but you can see in it in my enslaved showreel from 2:00. It's super short but I couldn't find any specific youtube video. Well, gotta play Enslaved to see it at its best ;)
Now, that was a bit short so let's talk some more.
When reducing the size of a clamped texture a lot, you can come across mipmap artifacts.
One fix is the Preserve Border option.
The tooltip says: ‘If true, the color border pixels are preserved by mipmap generation. One flag per color channel.’
Here is the texture I created. The last two pixels are plain black but pixel 3 and 4 start to be white. The dxt compression is done with blocks of 4 pixels so since I've got both black and white in a 4 pixel group, my mipmaps get messed up.
I reimported the texture and made sure I've got a clean 4 pixels border. Even with preserve border off, I don't get any artifacts.
They will appear at a lower mipmap though, but won't ever appear with a correct border and the preserve border option.
No comments:
Post a Comment