Jump to content
  • Advertisement

poigwym

Member
  • Content count

    115
  • Joined

  • Last visited

Community Reputation

303 Neutral

About poigwym

  • Rank
    Member

Personal Information

  • Role
    Programmer
  • Interests
    Programming
  1. Sure, now I don't know how to clear the append buffer in dx11, lol. Oh ! I've found that it can be done in CSSetUnorderedAccessViews !
  2. Anybody know is it necessary to clear AppendStructuredBuffer if I don't have a consume buffer ? What's the max size of AppendStructuredBuffer ? Now, my code doesn't clear the AppendStructuredBuffer, and the structured buffer i've created is very big, I append instances in compute shader every frame, then render, the instances flick everywhere.
  3. poigwym

    d3d11 Buffer data not correct

    solved, there's nothing missed, thank you !!!
  4. The code to create d3d11 structured buffer : D3D11_BUFFER_DESC desc; desc.ByteWidth = _count * _structSize; if (_type == StructType::Struct) { desc.MiscFlags = D3D11_RESOURCE_MISC_BUFFER_STRUCTURED; } else { desc.MiscFlags = 0; } desc.StructureByteStride = _structSize; desc.BindFlags = D3D11_BIND_SHADER_RESOURCE; if (_dynamic) { desc.Usage = D3D11_USAGE_DEFAULT; desc.CPUAccessFlags = 0; } else { desc.Usage = D3D11_USAGE_IMMUTABLE; desc.CPUAccessFlags = 0; } if (FAILED(getDevice()->CreateBuffer(&desc, NULL, &_object))) { return false; } D3D11_SHADER_RESOURCE_VIEW_DESC resourceViewDesc; memset(&resourceViewDesc, 0, sizeof(resourceViewDesc)); if(_type == StructType::Float) resourceViewDesc.Format = DXGI_FORMAT_R32_FLOAT; else if (_type == StructType::Float2) resourceViewDesc.Format = DXGI_FORMAT_R32G32_FLOAT; else if (_type == StructType::Float3) resourceViewDesc.Format = DXGI_FORMAT_R32G32B32_FLOAT; else if (_type == StructType::Float4) resourceViewDesc.Format = DXGI_FORMAT_R32G32B32A32_FLOAT; else resourceViewDesc.Format = DXGI_FORMAT_UNKNOWN; resourceViewDesc.ViewDimension = D3D11_SRV_DIMENSION_BUFFER; resourceViewDesc.Buffer.ElementOffset = 0; resourceViewDesc.Buffer.NumElements = _count; ID3D11Resource* viewObject = _object; auto hr = getDevice()->CreateShaderResourceView(viewObject, &resourceViewDesc, &_shaderResourceView); if (FAILED(hr)) { return false; } I've created a float type structured buffer. The source data is a float array, I update the buffer from array[startIndex] to array[endIndex - 1]. The code to update buffer : bool setData(int startIndex, int endIndex, const void* data) { if (!data) return false; D3D11_BOX destBox; destBox.left = startIndex * _structSize; destBox.right = endIndex * _structSize; destBox.top = 0; destBox.bottom = 1; destBox.front = 0; destBox.back = 1; getContext()->UpdateSubresource(_object, 0, &destBox, data, _count * _structSize, 0); } The final result is that the data is not smooth, then I change the code of setData destBox.left = startIndex ; destBox.right = endIndex ; Then, the result looks smooth, but with some data missed !!!! Don't know why..
  5. data-driven is good for user, not for engine developer. i  make my engine as a data-driven one mainly for easily test post processing, and  scene_pass can be picked  by engine, not by render item itself .. though I have only  implemented depth-only pass for shadow , water_reflection_pass for water face. But hard to say what scene_pass i'll make, need constantly learn and test, so i  desire data-driven.  Hopefully the small data-driven is enough. If requirement is clear, data-driven would be easy-implement, and worthy to make one. But always change  render architecture will make data-driven a f u c k i n g thing.
  6. Yes, pure data config file can do data-driven.
  7. It would slow down the engine ?
  8. What thing can script language do for game engine development. Game engine core ,not game logic, especially about data-driven. e.g. Data driven render pipeline require a file to describe how to draw a frame, is there any advantage a script language can bring ?    
  9. Hellow!! How to implement soa layout vb in d3d11?  Is it possible ??
  10. poigwym

    good engine

    DOP seems have advantage to make isolated module, and is good for multi threading at the same time. Much better than OOP,  which brings ugly code. I found this -> https://github.com/taylor001/crown  , they said they were inspired by bitsquid,  I guess they have had a look at bitsquid's code. dont know if it is worthy to learn from.
  11. poigwym

    good engine

    That excludes Unreal an Unity as both are large and not the kind of engine a single person could make in a reasonable time scale.   What about Panda 3D? Panda 3D was made to allow students control of even the lowest code in the engine, I belief it's kind of dead now however it's easy to make changes to the engine and I think a single person could replicate it.   Panda3D looks good.
  12. poigwym

    good engine

    I have made an horde3d-like engine and learned something about multi-thread rendering from bistquad engine and Parallelizing the Naughty Dog engine using fibers.pdf, and now want to add render component ( and maybe multi-thread rendering ) into it. Both seems to bring big change to my engine, so I need a good programming skill to write good code..... That's say make a good engine to make a better engine...
  13. poigwym

    good engine

    create game on my own fully, learn tech ,  personal 3d engine that's flexible and modular for future expansion.
  14. Hellow !!! How to write an engine that easy to transplant. A module can picked to another engine without modification. Sounds like I have written many engine, but don't laugh, I do write many small engine, so I don't want to write again and again.
  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!