Jump to content
  • Advertisement

reaperrar

Member
  • Content Count

    100
  • Joined

  • Last visited

Community Reputation

136 Neutral

About reaperrar

  • Rank
    Member
  1. reaperrar

    Voxel disk operations?

    Can you enlighten as to the difference between 2D voxels and pixels?   My interpretation would be a voxel has volume and a pixel is more of a point. A 2D voxel is one that exists in 2D space, so a 2D volume.   Two dimensional space does not have concept for volume. Do you mean area?   Yes, area would be more accurate.
  2. reaperrar

    Voxel disk operations?

    Can you enlighten as to the difference between 2D voxels and pixels?   My interpretation would be a voxel has volume and a pixel is more of a point. A 2D voxel is one that exists in 2D space, so a 2D volume.   Thank you for your answer.
  3. For a 2d voxel game, is it viable to store the procedurally generated mesh to file?   I know disk operations can be a bottleneck, but so can generated meshes on the fly. I'm wondering which generally has the least performance impact.   Minecraft saves a lot of data with its chunks but there is no mention of the actual meshes being saved afaik.
  4. In a texture I have a square sprite (though it does not take up the whole texture, just a small portion).   I set up my UV coordinates to target just the sprite.   Sampler code:     oSamplerDesc.Filter = D3D11_FILTER_MIN_MAG_MIP_POINT;     oSamplerDesc.AddressU = D3D11_TEXTURE_ADDRESS_WRAP;     oSamplerDesc.AddressV = D3D11_TEXTURE_ADDRESS_WRAP;     oSamplerDesc.AddressW = D3D11_TEXTURE_ADDRESS_WRAP;     oSamplerDesc.MipLODBias = 0.0f;     oSamplerDesc.MaxAnisotropy = 1;     oSamplerDesc.ComparisonFunc = D3D11_COMPARISON_ALWAYS;     oSamplerDesc.BorderColor[0] = 0;     oSamplerDesc.BorderColor[1] = 0;     oSamplerDesc.BorderColor[2] = 0;     oSamplerDesc.BorderColor[3] = 0;     oSamplerDesc.MinLOD = 0;     oSamplerDesc.MaxLOD = D3D11_FLOAT32_MAX; When rendering the sprite to the screen using an orthographic projection with no rotating it renders perfectly.   However, if I scale the sprite non-uniformly (as it is being use as a frame that stretches) then the parts of the texture surrounding the sprite seem to be sampled.   I drew a coloured border around my square sprite and can see the red bleeding in to the edges of the texture in the above scenario.   A more detailed explanation... Here are some frame pieces for a frame, a bar and a corner. The bar is to be stretched to accommodate the frame dimensions whereas the corner is not. Here is the frame rendering in-game. Notice the coloured borders are ignored, they were not included using the UV coordinates I set.   Now here is the exact same example as the above except I've changed the overall scale for the frame to reduce its size. (I've re-shaped the frame as that is part of its functionality)   I get the positions for my texture sampling like this... The squares represent pixels, the blue squares are pixels in a sprite, the red circles are the positions I use.   Why is there sampling around the sprite when the frame is scaled smaller?
  • 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!