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

Devin Argent

  • Content count

  • Joined

  • Last visited

Community Reputation

108 Neutral

About Devin Argent

  • Rank
  1. Found the solution! I was unaware that the Geometry shader actually takes input from the Vertex shader (I thought it was the other way around). This got answered on the OpenGL forums over [url="http://www.opengl.org/discussion_boards/showthread.php/179676-strange-problems-with-billboard-shader-%28Geometry-shader%29?p=1244570#post1244570"]here[/url]. Thanks to all who answered.
  2. [quote name='Jaroy' timestamp='1352870615' post='5000799'] Id start commenting out code till I narrowed down the issue. First change your fragment shader to the following... [source lang="java"]void main(void) { outputF = ColorOut; }[/source] Is the colour shown? If so then it's either your texture or the "Alpha" parameter not being initialise correctly. [/quote] Still comes out blank, infact the current setup doesn't work properly unless I manually set the locations. The weird thing is, it maps the texture properly. So the texture comes out fine, but it's black (obviously because of the coloring). I'll update the original post with the semi-working version. So it show's the texture, but not the color. This screenshot below shows what it looks like when only using the ColorOut value with OutputF. Note: the black squares should at-least be white. [img]http://www.buttonbashed.co.nz/ExtraUploads/ShaderProblem.jpg[/img]
  3. Hi guys, I'm in dire need for help; For some reason my ins/outs don't seem to be matching up, and I can't figure out why, I've spent a few days on it now. My code was based off a billboarding tutorial, I seem to have lost the link to it. But here's the source for my shaders below. Can you tell me what's going on? My Color is black in the fragment shader, even though it's sent in to the shader as white. And even if I manually set the color to white in the vertex shader it still appears black in the fragment shader. [b]Geometry shader[/b] [CODE] #version 330 #extension GL_ARB_separate_shader_objects : enable layout (points) in; layout (triangle_strip) out; layout (max_vertices = 4) out; uniform mat4 gVP; uniform vec3 gCameraPos; layout (location = 1) in float inScale[1]; layout (location = 2) in vec4 inTexCoord[1]; layout (location = 3) in vec4 inColor[1]; layout (location = 1) out vec2 TexCoord; layout (location = 2) out vec4 Color; void main() { vec3 Pos = gl_in[0].gl_Position.xyz; vec3 toCamera = normalize(gCameraPos - Pos); vec3 up = vec3(0.0, 1.0, 0.0); vec3 right = cross(toCamera, up); vec4 tc = inTexCoord[0]; float Sc = inScale[0]; vec4 col = inColor[0]; Pos -= (right * (Sc * 0.5)); Pos.y -= Sc * 0.5; gl_Position = gVP * vec4(Pos, 1.0); TexCoord = vec2(tc.x, tc.y); Color = col; EmitVertex(); Pos.y += Sc; gl_Position = gVP * vec4(Pos, 1.0); TexCoord = vec2(tc.x, tc.w); Color = col; EmitVertex(); Pos.y -= Sc; Pos += right * Sc; gl_Position = gVP * vec4(Pos, 1.0); TexCoord = vec2(tc.z, tc.y); Color = col; EmitVertex(); Pos.y += Sc; gl_Position = gVP * vec4(Pos, 1.0); TexCoord = vec2(tc.z, tc.w); Color = col; EmitVertex(); EndPrimitive(); } [/CODE] [b]Vertex shader[/b] [CODE] #version 330 #extension GL_ARB_separate_shader_objects : enable layout (location = 0) in vec3 Position; layout (location = 1) in vec2 TexCoord; layout (location = 2) in vec4 Color; // vertex shader layout (location = 1) out vec2 TexCoordOut; layout (location = 2) out vec4 ColorOut; void main() { gl_Position = vec4(Position, 1.0); TexCoordOut = TexCoord; ColorOut = Color; } [/CODE] [b]Fragment shader[/b] [CODE] #version 330 #extension GL_ARB_separate_shader_objects : enable uniform sampler2D TextureMap; uniform float Alpha; // fragment shader in vec2 TexCoordOut; in vec4 ColorOut; out vec4 outputF; void main(void) { //vec4 tex = texture(TextureMap, TexCoordOut.xy); //tex.a *= Alpha; //tex *= ColorOut; //if (tex.a <= 0.0) //{ // discard; //} //else //{ outputF = ColorOut; //} } [/CODE]