Jump to content
  • Advertisement

Search the Community

Showing results for tags 'DX11' in content posted in Graphics and GPU Programming.

The search index is currently processing. Current results may not be complete.


More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Categories

  • Audio
    • Music and Sound FX
  • Business
    • Business and Law
    • Career Development
    • Production and Management
  • Game Design
    • Game Design and Theory
    • Writing for Games
    • UX for Games
  • Industry
    • Interviews
    • Event Coverage
  • Programming
    • Artificial Intelligence
    • General and Gameplay Programming
    • Graphics and GPU Programming
    • Engines and Middleware
    • Math and Physics
    • Networking and Multiplayer
  • Visual Arts
  • Archive

Categories

  • Audio
  • Visual Arts
  • Programming
  • Writing

Categories

  • Game Dev Loadout
  • Game Dev Unchained

Categories

  • Game Developers Conference
    • GDC 2017
    • GDC 2018
  • Power-Up Digital Games Conference
    • PDGC I: Words of Wisdom
    • PDGC II: The Devs Strike Back
    • PDGC III: Syntax Error

Forums

  • Audio
    • Music and Sound FX
  • Business
    • Games Career Development
    • Production and Management
    • Games Business and Law
  • Game Design
    • Game Design and Theory
    • Writing for Games
  • Programming
    • Artificial Intelligence
    • Engines and Middleware
    • General and Gameplay Programming
    • Graphics and GPU Programming
    • Math and Physics
    • Networking and Multiplayer
  • Visual Arts
    • 2D and 3D Art
    • Art Critique and Feedback
  • Community
    • GameDev Challenges
    • GDNet+ Member Forum
    • GDNet Lounge
    • GDNet Comments, Suggestions, and Ideas
    • Coding Horrors
    • Your Announcements
    • Hobby Project Classifieds
    • Indie Showcase
    • Article Writing
  • Affiliates
    • NeHe Productions
    • AngelCode
  • Topical
    • Virtual and Augmented Reality
    • News
  • Workshops
    • C# Workshop
    • CPP Workshop
    • Freehand Drawing Workshop
    • Hands-On Interactive Game Development
    • SICP Workshop
    • XNA 4.0 Workshop
  • Archive
    • Topical
    • Affiliates
    • Contests
    • Technical
  • GameDev Challenges's Topics
  • For Beginners's Forum
  • Unreal Engine Users's Unreal Engine Group Forum
  • Unity Developers's Forum
  • Unity Developers's Asset Share

Calendars

  • Community Calendar
  • Games Industry Events
  • Game Jams
  • GameDev Challenges's Schedule

Blogs

There are no results to display.

There are no results to display.

Product Groups

  • Advertisements
  • GameDev Gear

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Website


Role


Twitter


Github


Twitch


Steam

Found 7 results

  1. Hi guys, i am trying to implement a simple font renderer using bitmap font texture with a dynamic vertex buffer, i am able to successfully display text with correct glyph from bitmap texture. right now i am trying to draw a dynamic string that changes at user input, i.e user able change the displayded text by typing the new one. The issue is that length of string is exactly same as what it was initialized with even when updating string at every render frame. string gets updated every fram but is capped at length equal to what is was initialized with. i am suspecting that vertexBufferDesc.ByteWidth is not getting updated even when i update vertexbuffer by map and unmap it. initialize bool GlyphClass::Initialize(ID3D11Device* device, HWND hwnd, int screenWidth, int screenHeight, WCHAR* path) { bool result; m_GlyphWidthData.open("Font/AgencyFBFont_64x64_width.txt"); while (1) { if (m_GlyphWidthData.eof()) { break; } int tmp = 0; m_GlyphWidthData >> tmp; if (tmp != 0) { m_GlyphWidth.push_back(tmp); } } m_GlyphWidthData.close(); m_GlyphCharacter = 'A'; m_StringToDraw = "TEXTTEST@xyz";//userInputString != "" ? userInputString : "VIVEK599 xyz"; m_fontTextureShader = new TextureShaderClass; if (!m_fontTextureShader) { return false; } result = m_fontTextureShader->Initialize(device, hwnd); if (!result) { MessageBox(hwnd, L"Could not initialize font texture shader object!", L"Error", MB_OK); return false; } m_ScreenWidth = screenWidth; m_ScreenHeight = screenHeight; result = InitializeBuffers(device); if (!result) { return false; } result = LoadTexture(device, path); if (!result) { return false; } return true; } updatebuffer bool GlyphClass::UpdateBuffers(ID3D11DeviceContext* context, int posX, int posY) { m_StringToDraw = userInputString != "" ? userInputString : "STRING 555@xyz0123456789"; VertexType* vertices; D3D11_MAPPED_SUBRESOURCE mappedResource; VertexType* vertexPtr; HRESULT hr; vertices = new VertexType[m_VertexCount * m_StringToDraw.length()]; if (!vertices) { return false; } // Initialize vertex array to zeros at first. memset(vertices, 0, sizeof(VertexType) * m_VertexCount * m_StringToDraw.length() ); float posXOffset = (float)posX; float posYOffset = (float)posY; for ( int i = 0; i < m_StringToDraw.length(); i++ ) { int cx = m_StringToDraw[i] % 16; int cy = m_StringToDraw[i] / 16; float tex_left = (float)cx * (1.f / 16.f); float tex_top = (float)cy * (1.f / 16.f); float tex_right = tex_left + (1.f / 16.f) * ((float)m_GlyphWidth[m_StringToDraw[i]] / 64.f); float tex_bottom = tex_top + (1.f / 16.f); int totalCharWidth = 64; float left = (float)((float)(m_ScreenWidth / 2.f) * -1) + posXOffset; float right = left + (float)m_GlyphWidth[m_StringToDraw[i]]; float top = (float)(m_ScreenHeight / 2.f) - posYOffset; float bottom = top - (float)totalCharWidth; //triangle 1 - clockwise vertices[0 + m_VertexCount * i].position = Vector3(left, top, 0.f); vertices[0 + m_VertexCount * i].texture = Vector2(tex_left, tex_top); vertices[1 + m_VertexCount * i].position = Vector3(right, bottom, 0.f); vertices[1 + m_VertexCount * i].texture = Vector2(tex_right, tex_bottom); vertices[2 + m_VertexCount * i].position = Vector3(left, bottom, 0.f); vertices[2 + m_VertexCount * i].texture = Vector2(tex_left, tex_bottom); //triangle + i 2 vertices[3 + m_VertexCount * i].position = Vector3(left, top, 0.f); vertices[3 + m_VertexCount * i].texture = Vector2(tex_left, tex_top); vertices[4 + m_VertexCount * i].position = Vector3(right, top, 0.f); vertices[4 + m_VertexCount * i].texture = Vector2(tex_right, tex_top); vertices[5 + m_VertexCount * i].position = Vector3(right, bottom, 0.f); vertices[5 + m_VertexCount * i].texture = Vector2(tex_right, tex_bottom); posXOffset += m_GlyphWidth[m_StringToDraw[i]]; } hr = context->Map(m_VertexBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource); if (FAILED(hr)) { return false; } vertexPtr = (VertexType*)mappedResource.pData; int bufferSize = sizeof(VertexType) * m_VertexCount * m_StringToDraw.length(); memcpy(vertexPtr, (void*)vertices, bufferSize); D3D11_BUFFER_DESC tmpDesc; m_VertexBuffer->GetDesc(&tmpDesc); context->Unmap(m_VertexBuffer, 0); delete[] vertices; vertices = 0; return true; }
  2. Hi, I currently have Naive Surface Nets working in a Compute Shader and I'm using a Dictionary to load chunks around the player. Retrieving meshes from the Compute Shader back to the CPU and creating Unity collision meshes is causing a lot of stalling. I've decided to tackle this by implementing a LOD system. I've found the 0fps articles on simplifying isosurfaces to be a weath of information. After studying those and looking at the papers I've identified what I think are the two main directions for approaching LOD: Mesh Simplification and Geometry Clipmaps. I am aiming to get one or both of these working in a Compute Shader. This brings me to my questions: 1) I've seen a lot of feedback that Mesh Simplification is going to be too slow for realtime terrain editing, is there a consensus on this? Most algorithms appear to use the half-edge format but I can't find any information on efficiently converting an indexed mesh into half-edge mesh format. Can anyone provide an example? 2) Can the Geometry Clipmap approach work with 3D terrain as opposed to heightmaps? Would I need to store my chunks in Octrees to make it work? Are there any GPU implementation examples that don't work on heightmaps? Any advice to help me further focus my research would be much appreciated. Thanks.
  3. Hi guys Looking for resources on emulating the illumination and after glow of CRT oscilloscope displays, like on these old radar scopes. So far my google searches aren't returning anything useful. Any suggestions?
  4. how is the BSDF function used in the kajiya rendering équations ? We know that path tracing proivde an analytical solution and we saw the BSDF function at first time in the path tracing algorithm. After that, is there a way to use mutliple BSDF function in a full rendering process ? If you have some links to any books or website, please share it !
  5. I've implemented a basic version of Voxel Cone Tracing that uses a single volume texture (covering a small region around the player). But I want to have large and open environments, so I must use some cascaded (LoD'ed) variant of the algorithm. 1) How to inject sky light into the voxels and how to do it fast? (e.g. imagine a large shadowed area which is lit by the blue sky above.) I think, after voxelizing the scene I will introduce an additional compute shader pass where, from each surface voxel, I will trace cones in the direction of the surface normal until they hit the sky (cubemap), but, I'm afraid, it would be slow with Cascaded Voxel Cone Tracing. 2) How to calculate (rough) reflections from the sky (and distant objects)? If the scene consists of many "reflective" pixels, tracing cones through all cascades would destroy performance. Looks like Voxel Cone Tracing is only suited for smallish indoor scenes (like Doom 3-style cramped spaces).
  6. Hello, I have some questions about HLSL register which can't find any good reference s on the internet. 1. what is the differencet of register b and c? Are this two lines equivalent (in term of using and binding data) float4 dummy :register(b0) and float4 dummy :register(c0) 2. What is the benefit of keyword Constant Buffer Are these 2 codes eqivalent? float4 v1 :register(c0) // or (b0) and Constant buffer dummy : register(b0) // or (c0)? { float4 v1 :register(c0) } 3. What register that "SetPixelShaderConstantF" bind data to? b or c or both? Thanks
  7. I'm implementing single-pass surface voxelization (via Geometry Shader) for Voxel Cone Tracing (VCT), and after some debugging I've discovered that I have to insert out-of-bounds checks into the pixel shader to avoid voxelizing geometry which is outside the voxel grid: void main_PS_VoxelTerrain_DLoD( VSOutput pixelInput ) { const float3 posInVoxelGrid = (pixelInput.position_world - g_vxgi_voxel_radiance_grid_min_corner_world) * g_vxgi_inverse_voxel_size_world; const uint color_encoded = packR8G8B8A8( float4( posInVoxelGrid, 1 ) ); const int3 writecoord = (int3) floor( posInVoxelGrid ); const uint writeIndex1D = flattenIndex3D( (uint3)writecoord, (uint3)g_vxgi_voxel_radiance_grid_resolution_int ); // HACK: bool inBounds = writecoord.x >= 0 && writecoord.x < g_vxgi_voxel_radiance_grid_resolution_int && writecoord.y >= 0 && writecoord.y < g_vxgi_voxel_radiance_grid_resolution_int && writecoord.z >= 0 && writecoord.z < g_vxgi_voxel_radiance_grid_resolution_int ; if( inBounds ) { rwsb_voxelGrid[writeIndex1D] = color_encoded; } else { rwsb_voxelGrid[writeIndex1D] = 0xFF0000FF; //RED, ALPHA } } Why is this check needed, and how can I avoid it? Shouldn't Direct3D automatically clip the pixels falling outside the viewport? (I tried to ensure that out-of-bounds pixels are clipped in the geometry shader and I also enable depthClip in rasterizer, but it doesn't work.) Here's a picture illustrating the problem (extraneous voxels are highlighted with red): And here the full HLSL code of the voxelization shader:
  • 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!