Help me with multitexturing
I have two textures at stages 0 and 1. one is a jpg and the other is
a greyscale created texture that represents the shadows. I want to blend them togheter to have colors and shadows at the same time.
I dont know how to set the stage state... Help me!!!
Hi there Baf,
How are you doing?
The Problem
Setting texture stages to modulate between the 2 textures that you have loaded into different stages.
The Solution
Basically what thise does is gets the color from each texture and modulates between them. Modulate meaning, adapt, alter, change, transform or revise.
I hope this helps a bit. If anyone has some other suggestions or a little more insight as to the operation of TextureStageStates this will be a great opportunity to explain them in detail.
How are you doing?
The Problem
Setting texture stages to modulate between the 2 textures that you have loaded into different stages.
The Solution
pDevice->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE);pDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG1);pDevice->SetTextureStageState(1, D3DTSS_COLORARG1, D3DTA_TEXTURE);pDevice->SetTextureStageState(1, D3DTSS_COLORARG2, D3DTA_CURRENT);pDevice->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_MODULATE);
Basically what thise does is gets the color from each texture and modulates between them. Modulate meaning, adapt, alter, change, transform or revise.
I hope this helps a bit. If anyone has some other suggestions or a little more insight as to the operation of TextureStageStates this will be a great opportunity to explain them in detail.
Thank you very much Armadon it works very well!!
Now i need to filter with setting sampler state...
Which is the best way?
i tried with
Device->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR);
Device->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
Device->SetSamplerState(0, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR);
Device->SetSamplerState(1, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR);
Device->SetSamplerState(1, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
Device->SetSamplerState(1, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR);
but i see to many lines on the screen
Now i need to filter with setting sampler state...
Which is the best way?
i tried with
Device->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR);
Device->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
Device->SetSamplerState(0, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR);
Device->SetSamplerState(1, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR);
Device->SetSamplerState(1, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
Device->SetSamplerState(1, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR);
but i see to many lines on the screen
I'm not sure what you mean with "lines in the rendering". Maybe you could post a screenshot?
Upload a screenshot(taken with the printscreen button) in Imageshack.us and then post that picture here with the <*img src="the internet adress of the image wich you got from imageshack"*> Without the *'s of course
Quote:Original post by Baf
ok i trie
>
Good attempt, but like Samsonite pointed out, you only need:
<img src="http://img256.imageshack.us/img256/1552/lines6ed.jpg">
which should lead to this result:
[smile]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement