Jump to content
  • Advertisement

Deep314

Member
  • Content Count

    7
  • Joined

  • Last visited

Community Reputation

100 Neutral

About Deep314

  • 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. Deep314

    Write Z-Buffer to BMP

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

    DX9 HLSL Vertex shader problem

    In other words i need render human model into depth map.
  5. Deep314

    DX9 HLSL Vertex shader problem

    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)
  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?
  7. Deep314

    HLSL Pixel Shader

    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?
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!