Jump to content

  • Log In with Google      Sign In   
  • Create Account


Multi-Texturing using single texture


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
1 reply to this topic

#1 NewDisplayName   Members   -  Reputation: 359

Like
0Likes
Like

Posted 12 March 2012 - 05:21 AM

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

Sponsor:

#2 Dawoodoz   Members   -  Reputation: 294

Like
0Likes
Like

Posted 13 March 2012 - 04:28 AM

I would define my own supersampling pattern in the shader for deterministic rendering since performance is not a problem.

My open source DirectX 10/11 graphics engine. https://sites.google.com/site/dawoodoz

"My design pattern is the simplest to understand. Everyone else is just too stupid to understand it."





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