  # Deep314

Member

7

## Community Reputation

100 Neutral

• Rank
Newbie
1. Hi all! How can i rotate bones of human model loaded from .X file in application? P S .X file without animation. Thanks.
2. No. I still not write depth to texture . Im beginner in DirectX. How can i render z-buffer to texture? Can I do it without shaders?
3. Hi all. Can i write z buffer to a file using DirectX9? Or somehow find its address in a memory?
4. Yeah. When i did make copy of Position in VertexShader it works. Now i need render each pixel of human model in grayscale(or red,bluescale...). It use next algorithm: exists loaded human 3d model. exist any point in field with coordinates (x1,y1,z1). for every human point (x,y,z) do r = sqrt((x-x1)^2+(y-y1)^2+(z-z1)^2) r = r / 1000 <---normalize. r<1 Output.RGBColor = float4(r,0,0,0) <-----redscale I did it. But when i load this shader program crashed. struct VS_OUTPUT { float4 Position : POSITION; // vertex position float4 Diffuse : COLOR0; // vertex diffuse color (note that COLOR0 is clamped from 0..1) float2 TextureUV : TEXCOORD0; // vertex texture coords float4 Position4PS : TEXCOORD1; <---Additional field }; PS_OUTPUT RenderScenePS( VS_OUTPUT In, uniform bool bTexture ) { PS_OUTPUT Output; float r,x,y,z; x = In.Position4PS.x; y = In.Position4PS.y; z = In.Position4PS.z; r = sqrt((x-10)(x-10)+(y-10)(y-10)+(z-10)(z-10)); r = r/1000; Output.RGBColor = float4(r,0,0,0); return Output; } It must be something like picture in attach(depth image)
5. Hi all. Why it doesnt work? struct VS_OUTPUT { float4 Position : POSITION; // vertex position float4 Diffuse : COLOR0; float2 TextureUV : TEXCOORD0; } PS_OUTPUT RenderScenePS( VS_OUTPUT In, uniform bool bTexture ) { PS_OUTPUT Output; Output.RGBColor = float4(In.Position.x,0,0,0); return Output; } But if i change Output.RGBColor = float4(In.Position.x,0,0,0); to Output.RGBColor = float4(0,0,0,0); all work great! Where im wrong?
6. Hi all. Why it doesnt work? struct VS_OUTPUT { float4 Position : POSITION; // vertex position float4 Diffuse : COLOR0; float2 TextureUV : TEXCOORD0; } PS_OUTPUT RenderScenePS( VS_OUTPUT In, uniform bool bTexture ) { PS_OUTPUT Output; Output.RGBColor = float4(In.Position.x,0,0,0); return Output; } But if i change Output.RGBColor = float4(In.Position.x,0,0,0); to Output.RGBColor = float4(0,0,0,0); all work great! Where im wrong?