• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.


  • Content count

  • Joined

  • Last visited

Community Reputation

122 Neutral

About Corillian

  • Rank
  1. Thanks, I figured it was likely a driver issue but wanted to make sure I wasn't crazy. I guess I'll continue waiting for the next major driver release.
  2. I'm having an odd problem with D3D12 compute shaders. I have a very simple compute shader that does nothing but write the global ID of the current thread out to a buffer: RWStructuredBuffer<uint> g_pathVisibility : register(u0, space1); cbuffer cbPushConstants : register(b0) { uint g_count; }; [numthreads(32, 1, 1)] void main(uint3 DTid : SV_DispatchThreadID) { if(DTid.x < g_count) { g_pathVisibility[DTid.x] = DTid.x + 1; } } I'm allocating 2 buffers with space or 128 integers. One buffer is the output buffer for the shader above and the other is a copy destination buffer for CPU readback. If I set numthreads() to any power of two, for example it's set to 32 above, I get a device reset error on NVIDIA hardware only. If I set numthreads() to any non-power of 2 value the shader works as expected. The exceptionally odd thing is that all of the compute shaders in the D3D12 samples work fine with numthreads() containing powers of 2. It doesn't matter if I execute the compute shader on a graphics queue or a compute queue - it's the same result either way. I've tested this on a GTX 1080 and a GTX 1070 with identical results. AMD cards seem to work as expected. Anyone have any idea what the hell could be going on? I tried asking NVIDIA on their boards but per-usual they never responded. I'm using their latest drivers. I've attached my sample application if anyone is interested, it's a UWP app since Visual Studio provides a nice D3D12 app template that I use to play around with simple ideas. The shader in question in the project is TestCompute.hlsl and the function where the magic happens is Sample3DSceneRenderer::TestCompute() line 1006 in Sample3DSceneRenderer.cpp. PathTransform_2.zip
  3. I have no idea how to use visual studio's but I wrote one myself (it only took me an afternoon in C#). The hardest part for me was figuring out how it calculated the angle of the curves for the tabs. Basically I just had to do trial and error comparing with screen shots until I got it right. One thing I have noticed is that whatever visual studio is using to render the fill for the tabs has something to do with XP's skinning because when I run vs.net 2k5 on vista RC1 the tabs have a gradient fill instead of a flat one. I havn't ported this over to my own implementation yet so I don't know any specifics. codeproject.com and codeguru.com have plenty of examples if you are unsure about writing your own.
  4. One quick question. XNA uses right handed matrices (though I believe they're still row major). Could this be a problem since i'm hand coding the texture matrix?
  5. Yes I am. The offset texture matrix (this is using XNA): float offsetX = 0.5f + (0.5f / (float)graphics.BackBufferWidth); float offsetY = 0.5f + (0.5f / (float)graphics.BackBufferHeight); float bias = 0.0001f; m_matTexOffset = new Matrix(0.5f, 0.0f, 0.0f, 0.0f, 0.0f, -0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, offsetX, offsetY, -bias, 1.0f); And the matViewToLightProj matrix calculation (though it's actually world space to light space, i just never changed the variable names): m_deferredShader.ViewToLightProjectionMatrix = m_lightCamera.ViewProjectionMatrix * m_matTexOffset; Thanks for the reply.
  6. Hello I have a question about whether or not I am going about shadow maps properly. My engine is using deferred shading to do the lighting as a post process. I am using the following render targets color: r32g32b32a32f normal: r32g32b32a32f position: r32g32b32a32f depth r32f The first pass renders the world space depth of all objects in relation to the position of the light source to the depth texture (r32f): VS_DEPTH_OUT vs_depth(VS_INPUT In) { VS_DEPTH_OUT Out; float4 pos = float4(In.ObjectPos, 1.0f); Out.Position = mul(pos, worldViewProjection); Out.Depth = mul(pos, matWorld).xyz; return Out; } float4 ps_depth(float3 depth : TEXCOORD0) : COLOR0 { return length(lightPos - depth); } The second pass renders the normals, colors, and position in world space using multiple render targets. The combine pass reads in the normal, position, and color for every pixel and then performs the lighting equation on it. At the moment I am projecting the world position of the pixel into light space using the light's view * projection matrix and then using that to do a tex2Dproj() lookup into the depth/shadow map. The distance from the light source is then compared to see if it's in the shadow: float4 ps_combine(float2 texCoord : TEXCOORD0) : COLOR { float4 pos = tex2D(positionMapSampler, texCoord); float4 color = float4(tex2D(colorMapSampler, texCoord).xyz, 1.0f); //put the position in light space float4 vPosLight = mul(pos, matViewToLightProj); float shadow = tex2Dproj(depthMapSampler, vPosLight).x; float distance = length(lightPos - pos.xyz); float isShadowed = distance - 2.0001 > shadow ? 0.0f : 1.0f; I am currently having some fairly heavy issues with z-fighting requiring me to offset the depth by a fairly large number (2.0001). There are also horrendous aliasing artifacts. I understand I am not doing any form of filtering and the depth texture is the same size as the backbuffer but it's still much worse than many of the demo's i've seen that don't do filtering. Any and all ideas will be most appreciated. P.S. Here's a screen shot of what I currently have. The red pixels are a plane that intersects with the light frustum and is occluded by the teapot's shadow: Screen Shot
  7. Hello I am trying to get the points for the viewing frustrum in world space so that I can render it. So far I am able to render something that resembles a viewing frustrum except the far plane appears to be about half the dimensions it's supposed to be. I have poured over all of the threads I could find on these boards and other sources on the internet but nothing i've tried has fixed the problem just yet. Here is my code (d3d): The function to pull the planes from the matrix mat which is (view * proj): m_vLeft.a = mat._14 + mat._11; m_vLeft.b = mat._24 + mat._21; m_vLeft.c = mat._34 + mat._31; m_vLeft.d = mat._44 + mat._41; D3DXPlaneNormalize(&m_vLeft, &m_vLeft); m_vRight.a = mat._14 - mat._11; m_vRight.b = mat._24 - mat._21; m_vRight.c = mat._34 - mat._31; m_vRight.d = mat._44 - mat._41; D3DXPlaneNormalize(&m_vRight, &m_vRight); m_vBottom.a = mat._14 + mat._12; m_vBottom.b = mat._24 + mat._22; m_vBottom.c = mat._34 + mat._32; m_vBottom.d = mat._44 + mat._42; D3DXPlaneNormalize(&m_vBottom, &m_vBottom); m_vTop.a = mat._14 - mat._12; m_vTop.b = mat._24 - mat._22; m_vTop.c = mat._34 - mat._32; m_vTop.d = mat._44 - mat._42; D3DXPlaneNormalize(&m_vTop, &m_vTop); m_vNear.a = mat._13; m_vNear.b = mat._23; m_vNear.c = mat._33; m_vNear.d = mat._43; D3DXPlaneNormalize(&m_vNear, &m_vNear); m_vFar.a = mat._14 - mat._13; m_vFar.b = mat._24 - mat._23; m_vFar.c = mat._34 - mat._33; m_vFar.d = mat._44 - mat._43; D3DXPlaneNormalize(&m_vFar, &m_vFar); After that I make a call to get each point of the frustrum: //far bottom left GetIntersectionWithPlanes(m_vFar, m_vBottom, m_vLeft, pOut); The intersection code is the following: void GetIntersectionWithPlanes(D3DXPLANE &plane1, D3DXPLANE &plane2, D3DXPLANE &plane3, D3DXVECTOR3 &outPoint) { //D3DXVECTOR3 linePoint, lineVect; D3DXMATRIX mat; D3DXVECTOR4 *vec; vec = (D3DXVECTOR4*)&mat.m[0]; *vec = *((D3DXVECTOR4*)&plane1); vec->w = 1.0f; vec = (D3DXVECTOR4*)&mat.m[1]; *vec = *((D3DXVECTOR4*)&plane2); vec->w = 1.0f; vec = (D3DXVECTOR4*)&mat.m[2]; *vec = *((D3DXVECTOR4*)&plane3); vec->w = 1.0f; vec = (D3DXVECTOR4*)&mat.m[3]; *vec = D3DXVECTOR4(0.0f, 0.0f, 0.0f, 1.0f); FLOAT d = D3DXMatrixDeterminant(&mat); D3DXMatrixInverse(&mat, &d, &mat); vec = (D3DXVECTOR4*)&mat.m[0]; outPoint.x = -vec->w; vec = (D3DXVECTOR4*)&mat.m[1]; outPoint.y = -vec->w; vec = (D3DXVECTOR4*)&mat.m[2]; outPoint.z = -vec->w; } I've tried transforming the point returned by the intersection function by the inverse of the view * proj matrix thinking I needed to go from clip space to world space but it did nothing: GetIntersectionWithPlanes(m_vFar, m_vBottom, m_vRight, pOut); D3DXVec3Transform(&pRes, &pOut, &matInv); If anyone could provide some insight on the matter that would be fantastic.