• 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

150 Neutral

About NikolajThorsen

  • Rank
  1. Heres a good article thats among one of those i found very useful when I implemented my deferred rendering engine: http://www.beyond3d.com/content/articles/19/1
  2. OpenGL

    Yes, i have used a similar solution, but this doesn't use the built-in GL_DEPTH24_STENCIL8_EXT. Having a separate color buffer just for stencil information seems very unnecessary. What is the correct way of getting the stencil part of GL_DEPTH24_STENCIL8_EXT, if i wish to display the stencil buffer on screen? If i have omitted any important details of my implementation, please tell me and ill give more information.
  3. First off, id like to thank anyone reading and/or replying to this first thread of mine. I have previous found help in others problems/solutions from this site, but i have been unable to find any help regarding my specific problem. So here i go with my own post. Im working on a deferred rendering engine at the moment, and i have multiple render targets. Along with storing positions, normals and diffuse color, i want one of these render targets to be used to store the depth and stencil values. Heres the code i use to create the texture: [CODE] .. glGenTextures(1, &depth_stencil_buffer); glBindTexture(GL_TEXTURE_2D, depth_stencil_buffer); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER); glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH24_STENCIL8_EXT, width, height, 0, GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT_24_8_EXT, NULL); glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_STENCIL_ATTACHMENT_EXT, GL_TEXTURE_2D , depth_stencil_buffer, 0); glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_TEXTURE_2D , depth_stencil_buffer, 0); .. [/CODE] Now i can bind this texture, depth_stencil_buffer in the above code snippet, and render it on a fullscreen quad, and i can correctly see depth of the scene geometry. Heres the not so special code: [CODE] .. glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D,depth_stencil_buffer); glUniform1i(glGetUniformLocation(m_uiTextureProgram, "tex"),0); glBindVertexArray(m_ui_texture_VAO); glDrawArrays(GL_TRIANGLES, 0,6); glBindVertexArray(0); glUseProgram(0); .. [/CODE] And my GLSL shader code looks something like this: [CODE] in vec2 tex_c; out vec4 output0; uniform sampler2D tex; void main() { output0 = texture(tex,tex_c); } [/CODE] Using this code its possible for me to display and observe the depth buffer. However, if I wish to render the stencil part of the texture, all i get is a white screen. I enable stencil testing, and even with a call to glClearStencil(0), which i think should turn the screen black instead of white, i still see only white tho. The way i try to render the stencil buffer, is by grabbing the .w coordinate (which should be the last 8bit containing stencil value) of the depth/stencil texture in the shader, and outputting just this value to screen. Heres the shader code that i use for this: [CODE] in vec2 tex_c; out vec4 output0; uniform sampler2D tex; void main() { output0 = vec4(texture(tex,tex_c).w); } [/CODE] I read in some OpenGL documentation (something i only vaguely remember), that if .w coordinate is missing (like if its only a vec3), getting .w in a shader always results in the value 1.0f. Could this be whats happening? This is btw not the only way if tried to render the stencil buffer to screen. But i have yet to find a working solution. Any and all help is appreciated! [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]