Texture effects
It is possible somehow to blend 2 textures without using a .fx file?How?Can you pls give me some good tutorials about this topic?
Hi,
this tutorial may help you:
Multitexturing in DX6
The things written there can be used in dx9 too, so don't worry ;)
Anyway, have a look at the SetTextureStageState() function in the SDK docs, and read this section of the SDK docs:
dx graphics / programming guide / getting started / d3d textures / texture blending
kp
this tutorial may help you:
Multitexturing in DX6
The things written there can be used in dx9 too, so don't worry ;)
Anyway, have a look at the SetTextureStageState() function in the SDK docs, and read this section of the SDK docs:
dx graphics / programming guide / getting started / d3d textures / texture blending
kp
Hi there Zmax,
How are you doing?
The Problem
Sure you can, Texture blending.
The Solution
You can check out this resource in the SDK.
Texture Blending
I hope this helps buddy.
How are you doing?
The Problem
Sure you can, Texture blending.
The Solution
You can check out this resource in the SDK.
Texture Blending
I hope this helps buddy.
Hi i don't know what to write in the last parameter of the
dev->SetTextureStageState( i, D3DTSS_COLOROP, WHAT IS THIS?); ...
this is how i use 2 textures trying to blend them:
device.SetTexture(0, VertexCls.Texture(0))
device.SetTextureStageState(0, TextureStageStates.ColorOperation, 1)
device.SetTextureStageState(0, TextureStageStates.ColorArgument1, 2)
device.SetTextureStageState(0, TextureStageStates.ColorArgument2, 3)
device.SetTexture(1, VertexCls.Texture(1))
device.SetTextureStageState(1, TextureStageStates.AlphaOperation, 1)
device.SetTextureStageState(1, TextureStageStates.AlphaArgument1, 2)
device.SetTextureStageState(1, TextureStageStates.AlphaArgument2, 3)
do i have to use a special material in on the vertxes, what type ? normaltextured,coloredtextured,positiontextured...i use now positiontextured,..it works for texture blending?
A,...actuly now my shape is complete white...hmm, why?
I want to texturate it only in some specific places with blend, and in the rest normal textured with one texture...
P.S I used this too but no positive effect:
Dim x As TextureArgument
Dim y As TextureOperation
device.SetTexture(0, VertexCls.Texture(0))
device.SetTextureStageState(0, TextureStageStates.ColorOperation, y.Add)
device.SetTextureStageState(0, TextureStageStates.ColorArgument1, x.TextureColor)
device.SetTextureStageState(0, TextureStageStates.ColorArgument2, x.Diffuse)
device.SetTexture(1, VertexCls.Texture(1))
device.SetTextureStageState(1, TextureStageStates.AlphaOperation, y.AddSmooth)
device.SetTextureStageState(1, TextureStageStates.AlphaArgument1, x.TextureColor)
device.SetTextureStageState(1, TextureStageStates.AlphaArgument2, x.Diffuse
[Edited by - Zmax on September 12, 2005 3:59:09 PM]
dev->SetTextureStageState( i, D3DTSS_COLOROP, WHAT IS THIS?); ...
this is how i use 2 textures trying to blend them:
device.SetTexture(0, VertexCls.Texture(0))
device.SetTextureStageState(0, TextureStageStates.ColorOperation, 1)
device.SetTextureStageState(0, TextureStageStates.ColorArgument1, 2)
device.SetTextureStageState(0, TextureStageStates.ColorArgument2, 3)
device.SetTexture(1, VertexCls.Texture(1))
device.SetTextureStageState(1, TextureStageStates.AlphaOperation, 1)
device.SetTextureStageState(1, TextureStageStates.AlphaArgument1, 2)
device.SetTextureStageState(1, TextureStageStates.AlphaArgument2, 3)
do i have to use a special material in on the vertxes, what type ? normaltextured,coloredtextured,positiontextured...i use now positiontextured,..it works for texture blending?
A,...actuly now my shape is complete white...hmm, why?
I want to texturate it only in some specific places with blend, and in the rest normal textured with one texture...
P.S I used this too but no positive effect:
Dim x As TextureArgument
Dim y As TextureOperation
device.SetTexture(0, VertexCls.Texture(0))
device.SetTextureStageState(0, TextureStageStates.ColorOperation, y.Add)
device.SetTextureStageState(0, TextureStageStates.ColorArgument1, x.TextureColor)
device.SetTextureStageState(0, TextureStageStates.ColorArgument2, x.Diffuse)
device.SetTexture(1, VertexCls.Texture(1))
device.SetTextureStageState(1, TextureStageStates.AlphaOperation, y.AddSmooth)
device.SetTextureStageState(1, TextureStageStates.AlphaArgument1, x.TextureColor)
device.SetTextureStageState(1, TextureStageStates.AlphaArgument2, x.Diffuse
[Edited by - Zmax on September 12, 2005 3:59:09 PM]
ok, im a bit hazy on this, but i think its how you want the textures to blend( or not to blend ). in fact to quote to docs:
it really depends on how you want the textures to blend together. do a serch for D3DTEXTUREOP in the DX help file to find out what they all do.
Quote:
D3DTSS_COLOROP
Texture-stage state is a texture color blending operation identified by one member of the D3DTEXTUREOP enumerated type. The default value for the first texture stage (stage 0) is D3DTOP_MODULATE; for all other stages the default is D3DTOP_DISABLE.
it really depends on how you want the textures to blend together. do a serch for D3DTEXTUREOP in the DX help file to find out what they all do.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement