• 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.

Scoob Droolins

  • Content count

  • Joined

  • Last visited

Community Reputation

258 Neutral

About Scoob Droolins

  • Rank
  1. This post reminded me to ask this - my engine does all rendering in HDR using DXGI_FORMAT_R16G16B16A16_FLOAT targets.  The final frame (scan-out) buffer is DXGI_FORMAT_R8G8B8A8_UNORM_SRGB so linear-to-gamma is handled automatically by HW.  Switching to  DXGI_FORMAT_R10G10B10A2_UNORM for scan-out, there is no automatic gamma encode.  Should I use the standard inverse sRGB compand or is there a different method for 10-bits?
  2. This will get you there - short and sweet.
  3. http://docs.autodesk.com/FBX/2014/ENU/FBX-SDK-Documentation/cpp_ref/_transformations_2main_8cxx-example.html Try the last function on the page - CalculateGlobalTransform - it worked predictably enough for me when exporting from 3ds Max.
  4. In my D3D11 implementation, I am getting proper alpha test just by setting alpha to coverage flag in blend stage. i have removed the 'clip' instructions from my pixel shaders and it still works even with no MSAA.  So ATC is acting just like clip - is there any performance advantage here?
  5. If you''re on DX11, you can just set DepthClipEnable = false in the D3D11_RASTERIZER_DESC structure when creating a rasterizer state.  According to the docs, this causes the rasterizer to skip the 0 <= z <= w clip check, actually it just skips the z <= w part, but clips close geometry right at 0.  This is a much neater solution than messing with proj matrix especially if you are using pre-defined rasterizer states.
  6. Thanks for all your replies.  The good news is, not a driver bug - this was my bug, a cross-up in identifying the texture format.  The DXT5 was being loaded as BC2 intead of BC3.
  7. Hi - I've implemented a pretty effective alpha test using Texture2D.GatherAlpha, works even better with alpha-to-coverage enabled.  If it gets past the clip(), i multiply the scalar alpha return value with the final color. cbuffer PAlphaTest : register (cb2) {   float4 alphaTestThresh; }; float MainSampleAlphaTest (Texture2D tex, SamplerState samp, float2 texCoord) {   float4 alphaSamp = tex.GatherAlpha (samp, texCoord, int2(0,0));   float alpha = dot (alphaSamp, 0.25);   clip (alpha - alphaTestThresh.x);   return (alpha); } WIth a DXGI_FORMAT_R8G8B8A8_UNORM_SRGB texture I get this:   [attachment=28982:a0.jpg]   WIth a DXGI_FORMAT_BC3_UNORM_SRGB texture I get this:   [attachment=28983:a1.jpg]   Strange bunch of lines with the BC3 texture - anyone seen this effect before? Thanks.  
  8. 5. Use D3DXSaveTextureToFile to save RT2 directly to a file
  9. In D3D9, you can indeed create a multisample render target, but it is not a texture, and cannot be used in a shader.  Your only option would be to resolve this target to a non-multisample texture of the same size, and use that in your shader.  Use StretchRect for the resolve.
  10. If you're interested in a non-texture method for Perlin simplex noize, I found this code here: https://github.com/ashima/webgl-noise/wiki.  I've used it in a pixel shader to generate really nice fine-grained noise when using screen X,Y as a parameter to the method.   float3 permute(float3 x) { return fmod(((x*34.0)+1.0)*x, 289.0); } // Perlin simplex noise float snoise(float2 v) { const float4 C = float4(0.211324865405187, 0.366025403784439, -0.577350269189626, 0.024390243902439); float2 i = floor(v + dot(v, C.yy) ); float2 x0 = v - i + dot(i, C.xx); float2 i1; i1 = (x0.x > x0.y) ? float2(1.0, 0.0) : float2(0.0, 1.0); // i1.x = step( x0.y, x0.x ); // x0.x > x0.y ? 1.0 : 0.0 // i1.y = 1.0 - i1.x; float4 x12 = x0.xyxy + C.xxzz; x12.xy -= i1; i = fmod(i, 289.0); float3 p = permute( permute( i.y + float3(0.0, i1.y, 1.0 )) + i.x + float3(0.0, i1.x, 1.0 )); float3 m = max(0.5 - float3(dot(x0,x0), dot(x12.xy,x12.xy), dot(x12.zw,x12.zw)), 0.0); m = m*m ; m = m*m ; float3 x = 2.0 * frac(p * C.www) - 1.0; float3 h = abs(x) - 0.5; float3 ox = floor(x + 0.5); float3 a0 = x - ox; m *= 1.79284291400159 - 0.85373472095314 * ( a0*a0 + h*h ); float3 g; g.x = a0.x * x0.x + h.x * x0.y; g.yz = a0.yz * x12.xz + h.yz * x12.yw; return 130.0 * dot(m, g); }    
  11. You have to sample the leaf texture and somehow output the texel alpha, either by multiplying it by your depth value (if you're using float textures) or just output it straightaway (if you're using a depth texture / PCF).   BTW, here are some useful values to use for alpha test reference value with alpha test func = greater:   0xBF - render when one of four pixels is color key value 0x7F - render when two of four pixels is color key value 0x3F - render when three of four pixels is color key value  
  12. Think of the heat effect as just one type of scene distortion which uses the current backbuffer as a source texture. There's also frosted/rippled glass, raindrops, ice, and so on. These materials should be drawn last, so our approach is to resolve the current backbuffer into a same-sized texture, then sample it with a screen projection. Shaders which use this texture don't use any lighting, it's already pre-lit. Works nicely for a lot of materials, and doesn't cause any serious performance issues.
  13. Using CSM with real depth textures (D24X8) and HW PCF, how is the issue of oversampling in the farther cascades solved? This is solved with MIPs and anisotropic filtering for standard color maps. But with depth maps, you can't create MIPs (except manually) and you can't autogen MIPs. Is the only solution, short of VSM, to dump HW PCF and go with FP24 or FP32 textures, which allow autogen of MIP levels?
  14. Try [url="http://developer.amd.com/tools/gpu/shader/Pages/default.aspx"]GPU Shader Analyzer from AMD[/url] - besides compiling shaders, you get static performance analysis and asm ouput, which is great for figuring out exactly what your shaders are doing.
  15. Regarding your cone stepping loop - you'd have to check the asm output to see if this bit is being in-lined, but if it is, it could be caused by defining cone_steps as a const int = 15. The compiler now knows the max number of loops and will inline the whole thing if there are enough instruction slots. Try to leave this undefined, set value from CPU, now the compiler doesn't know the max number of loops and will leave this bit as a loop. Whether that will help performance is unknown, but it will reduce instruction count by a ton.