Jump to content
  • Advertisement
Sign in to follow this  
violentrevolution

Multi-Texturing using single texture

This topic is 2322 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys,

I have been able to significantly enhance the quality of a video stream over UDP using multi-texturing in a slightly tweaked manner.
I am creating one texture for the video and then assigning it to 4 different samplers. On every sampler I am using Anisotropic filtering.
Somehow 4 has turned out to be the magic figure. Below 4, there is still some aliasing and gas in texts, and above 4 there is no significant change in video quality.

PFB the code snippet (Pardon my laziness, I am yet to put this in a loop) :


.....
_pd3dDevice->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR);
_pd3dDevice->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
_pd3dDevice->SetSamplerState(0, D3DSAMP_MIPFILTER, D3DTEXF_ANISOTROPIC);
_pd3dDevice->SetSamplerState(0, D3DSAMP_MAXANISOTROPY, 4);
_pd3dDevice->SetTexture(0, textureFromChannel);
_pd3dDevice->SetSamplerState(1, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR);
_pd3dDevice->SetSamplerState(1, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
_pd3dDevice->SetSamplerState(1, D3DSAMP_MIPFILTER, D3DTEXF_ANISOTROPIC);
_pd3dDevice->SetSamplerState(1, D3DSAMP_MAXANISOTROPY, 4);
_pd3dDevice->SetTexture(1, textureFromChannel);
_pd3dDevice->SetSamplerState(2, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR);
_pd3dDevice->SetSamplerState(2, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
_pd3dDevice->SetSamplerState(2, D3DSAMP_MIPFILTER, D3DTEXF_ANISOTROPIC);
_pd3dDevice->SetSamplerState(2, D3DSAMP_MAXANISOTROPY, 4);
_pd3dDevice->SetTexture(2, textureFromChannel);
_pd3dDevice->SetSamplerState(3, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR);
_pd3dDevice->SetSamplerState(3, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
_pd3dDevice->SetSamplerState(3, D3DSAMP_MIPFILTER, D3DTEXF_ANISOTROPIC);
_pd3dDevice->SetSamplerState(3, D3DSAMP_MAXANISOTROPY, 4);
_pd3dDevice->SetTexture(3, textureFromChannel);

// Draw stream
_pd3dDevice->DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2);
.....

I am assuming 2 things here: 1) RAM is not a concern 2) Graphics card is not a concern

Of course, internet bandwidth is a major concern, but till now haven't faced any issues for speeds as low as 512 kbps.

I am just keen to know that what can be the possible negatives out of this approach.

thanks

Share this post


Link to post
Share on other sites
Advertisement
I would define my own supersampling pattern in the shader for deterministic rendering since performance is not a problem.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!