• 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

102 Neutral

About noname01

  • Rank
  1. apparantly i found the error - i normalized `normalize(camera_pos - position);` in vertex shader and inerpolation screwed the results somehow   please delete the post )
  2. Hello, i have a demo program, defferred shading + parallax steep maping(is it?), it works on distance, but when you are close to the surface parallax acts very ugly. Everyhting is normalized, i am calculating in world coordinates.   here are shaders: #version 150 uniform mat4 projection; uniform mat4 camera; uniform mat4 model; uniform vec3 camera_pos; in vec3 vert_pos; in vec2 vert_tex_coord; in vec3 vert_normal; in vec3 vert_tangent; in vec3 vert_bitangent; out vec3 frag_pos; out vec3 frag_normal; out vec2 frag_tex_coord; out vec3 frag_tangent; out vec3 frag_bitangent; out vec3 frag_to_camera; void main() { mat3 normal_mat = mat3(transpose(inverse(model))); // applying model transformation vec3 position = vec3(model * vec4(vert_pos, 1)); vec3 normal = normalize(normal_mat * vert_normal); vec3 tangent = normalize(normal_mat * vert_tangent); vec3 bitangent = normalize(normal_mat * vert_bitangent); vec3 to_camera = normalize(camera_pos - position); // out gl_Position = projection * camera * model * vec4(vert_pos, 1); // pass to fshader frag_pos = position; frag_normal = normal; frag_tex_coord = vert_tex_coord; frag_tangent = tangent; frag_bitangent = bitangent; frag_to_camera = vec3(dot(to_camera, tangent) , dot (to_camera, bitangent) , dot (to_camera, normal)); } #version 150 in vec3 frag_normal; in vec2 frag_tex_coord; in vec3 frag_pos; in vec3 frag_tangent; in vec3 frag_bitangent; in vec3 frag_to_camera; uniform sampler2D normal_tex; uniform sampler2D diff_tex; uniform sampler2D spec_tex; uniform sampler2D disp_tex; out vec4 fbo_position; out vec4 fbo_normal; out vec4 fbo_diff; out vec4 fbo_spec; const float scale = 0.1; const float n_steps = 32.0; const float REFINE_EPS = 0.0001; const int MAX_ITER = 10; void main() { vec3 to_camera = normalize(frag_to_camera); vec3 normal = normalize(frag_normal); vec3 tangent = normalize(frag_tangent); vec3 bitangent = normalize(frag_bitangent); // setup layers loop float step = 1.0 / n_steps; vec2 tex_step = -1.0 * to_camera.xy * scale / (n_steps * to_camera.z); float current_layer = 1.0; vec2 cur_tex_coord = frag_tex_coord.xy; float height = texture2D(disp_tex, cur_tex_coord).r; // find correct layer while(height < current_layer) { current_layer -= step; cur_tex_coord += tex_step; height = texture2D(disp_tex, cur_tex_coord).r; } // interpolate vec2 prev_tex_coord = cur_tex_coord - tex_step; float h_cur = height; float h_prev = texture2D(disp_tex, prev_tex_coord).r; float l_cur = current_layer; float l_prev = current_layer + step; float d1 = l_prev - h_prev; float d2 = h_cur - l_cur; vec2 tex_coord = prev_tex_coord + tex_step * d1 / (d1 + d2); // altering parallax vec3 tex_normal = (2.0*texture2D(normal_tex, tex_coord).xyz - vec3(1.0)); vec3 pos = frag_pos + normal * (texture2D(disp_tex, tex_coord).r - 1) * scale; // forming output fbo_position.x = 1.0 / (1.0 + exp(pos.x)); fbo_position.y = 1.0 / (1.0 + exp(pos.y)); fbo_position.z = 1.0 / (1.0 + exp(pos.z)); fbo_normal = vec4(normalize(tex_normal.x * tangent + tex_normal.y * bitangent + tex_normal.z * normal), 0); fbo_diff = texture(diff_tex, tex_coord); fbo_spec = texture(spec_tex, tex_coord); } it is not optimal, but i want to get working system first.   did anyone encountered similar problems? any help will be appreciated.   And another question, how is this method called?)  in different places it described as relief mapping/parallax mapping/parallax occlusion mapping..
  3. Hello, i have simple shader, that makes perpixel lighting from point light (lambert - max(dot(normal, light), 0), everything is normalized) and it works fine, but when i put the light very close to a surface - light area shrinks. Mathmetically it seems to be correct, but this effect is ugly. Attenuation factor helps on far distance, but not on close. If needed, i can post the code, but i think it is about the lighting model. How to 'fix' this effect?