vinterberg

Members
  • Content count

    179
  • Joined

  • Last visited

Community Reputation

1237 Excellent

About vinterberg

  • Rank
    Member

Personal Information

  • Interests
    Programming
  1. What about doing a raycast check between previous -> current frame position? Like, testing bounding spheres against the line section between prev->cur position etc
  2. 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);
  3. I use this: https://github.com/Microsoft/DirectXTex
  4. Maybe this article would help? https://mtnphil.wordpress.com/2011/09/22/terrain-engine/ I'm thinking specifically the last part, "Additional optimizations" ...?
  5. 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....
  6. 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); };
  7. 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
  8. I just use this wrapper, works like a charm http://fw1.codeplex.com/
  9. XMVector3TransformNormal() leaves out any translation, which is appropiate for a direction vector
  10. You can make up your own semantic names, they just have to match in your shader
  11. 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]);
  12. Can you explain why you cannot use Load, which would seem like the way to go ...?
  13. 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!
  14. DX11 trying with ssao

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