vinterberg

Members
  • Content count

    178
  • Joined

  • Last visited

Community Reputation

1237 Excellent

About vinterberg

  • Rank
    Member

Personal Information

  • Interests
    Programming
  1. Why do you divide by distance? I assume m_fS is the interpolation value to go from startpos to endpos, so you should just do: l_transform->m_MotionInfo->m_fS += (l_transform->m_MotionInfo->m_fSpeed * m_fElapsedTime);
  2. I use this: https://github.com/Microsoft/DirectXTex
  3. Maybe this article would help? https://mtnphil.wordpress.com/2011/09/22/terrain-engine/ I'm thinking specifically the last part, "Additional optimizations" ...?
  4. If you're having trouble grasping the simple downsample technique, a compute shader will only confuse you more LOL Start out simple, and work from there....
  5. Pseudo-code: for (slice = (nslices - 1) to 1 step -1) { setrendertarget(texture[slice - 1]); // render to half-size texture pixelshader->setinputtexture(texture[slice]); texwidth = texture[slice].width; // the double-size texture we want to downsample texheight = texture[slice].height; float u_offset = (1.0f / texwidth) / 2.0f; // half texel size float v_offset = (1.0f / texheight) / 2.0f; pixelshader->setUVoffset(u_offset, v_offset); pixelshader->run(); // draw a fullscreen } pixelshader { pixel_out = texture_sample(texture_input, vertexshader_UV + UVoffset); };
  6. For each slice, you just use a simple copy-pixel pixel shader and adjust your UVs with 0.5 texel offset with linear filtering - just continue this down to the 1x1 texture. That way, you let the hardware filtering do the job of averaging the pixels with nearly no cost, since you're sampling in-between texels
  7. I just use this wrapper, works like a charm http://fw1.codeplex.com/
  8. XMVector3TransformNormal() leaves out any translation, which is appropiate for a direction vector
  9. You can make up your own semantic names, they just have to match in your shader
  10. DX11 Loading FBX with Directx 11

    What happens if you change it to this? MyV[3*p+v].TexCoords = XMFLOAT2((float)tex.mData[0], 1.0f - (float)tex.mData[1]);
  11. Can you explain why you cannot use Load, which would seem like the way to go ...?
  12. DX11 Loading FBX with Directx 11

    MyI = new DWORD[NumIndices]; MyI = (DWORD*)Mesh->GetPolygonVertices();//index array Unrelated: the first line shouldn't be there, you're allocating an array and forgetting about it right after!
  13. DX11 trying with ssao

    The article you linked to does: vec3 bitangent = cross(normal, tangent); What happens if you switch your ordering?
  14. This should give a start https://stackoverflow.com/questions/5020204/loading-a-precompiled-hlsl-shader-into-memory-for-use-with-createpixelshader
  15. 3D Can't Validate a mesh [pic attached]

    Sorry, but: You post alot of questions, more or less one new thread each other day. If everybody did that nobody would be able to keep up with all those new threads. When I resort to starting a thread on this forum, I've first done all I can to research an answer myself - which can take days sometimes of trial and error, reading (sometimes advanced/cryptic) research papers and forum posts here and elsewhere. That usually stops me from asking here, because I found the answer myself before it got to that. You just seem to encounter something you don't know how to solve, and start a thread about it. Frequently. There's so much value in finding your own answers whenever it's possible, and understanding why the answer works - instead of just getting the answer handed to you. I don't know if I'll get flak for this, but just wanted to voice that I'm getting a little annoyed by all the threads you start, measured against how I see other people use this forum. Many times, your threads aren't even very clear as to what the problem is, just a vague/unclear description and a wall of code which nobody wants to read through. Or, a simple 10 minute search would have provided the answer. As to your question, I searched for 1 min and found https://user.xmission.com/~legalize/book/download/19-D3DX Mesh Objects.pdf - page 20 states that you can use D3DXCleanMesh to fix issues reported by D3DXValidMesh. 1 minute is all it took, with search term "D3DXValidMesh degenerated primitives".