Jump to content

View more

Image of the Day

Working on an auto spawn system. #gamedev #indiedev #screenshotsaturday https://t.co/Mm2kfekz7b
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Multi-Texturing using single texture

4: Adsense

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   

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

#2 Dawoodoz   Members   

459
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.

"App". is an acronym and must always be followed by a dot.

https://en.oxforddictionaries.com/punctuation/punctuation-in-abbreviations





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.