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

tvsct456

Members
  • Content count

    8
  • Joined

  • Last visited

Community Reputation

119 Neutral

About tvsct456

  • Rank
    Newbie
  1. Hello guys, Currently, I'm working on sth about irradiance environment map ( generates diffuse/specular map from a given cubemap ). As I need to calculate the diffuse and specular factors from the cubemap, I need to know how to get every pixel on each side of the cubemap. But I cant figure it out. How can I unwrap the cubemap and render it on the screen ( Like post process ) or there are other ways to achieve this?
  2. [quote name='larspensjo' timestamp='1346832529' post='4976736'] When you start a project from "scratch", especially first time, I recommend to begin with a global shader. You can control it from Uniforms to get different behavior. As soon as you find that the shader is getting complex (too many conditional statements on uniforms, too much functionality that isn't really related, or if you find that you need to specialize because it is too slow), then it is easy to make a new shader from the old one and only keep what is relevant to each of them. That way, you will eventually get a library of shaders specialized for different situations. The opposite can happen also. That you get shaders that use common functionality that is a copy. There are mechanisms for that, like uniform buffers and ways to "#include" common source code in shaders. It is a lot like usual SW design. The usual problems of how to making a good design that is flexible, easy to change, fault tolerant, etc. [/quote] Thanks. What u said was very helpful to me.[img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img] I guess that I should start over by using a global shader. Different shaders cooperation makes me really confusing.
  3. Hello its me again. Im wondering if there can be a global shader that works to everything, such as fog, ambient lighting or sth else.. Im a beginer of GLSL. I dont know how to let the fog shader work to every objects on the scene, because some of the objects are being rednered by different shaders. So does it possible to write a Global shader? Or I need to edit every shader? Thanks
  4. [quote name='Ashaman73' timestamp='1346735516' post='4976311'] There is nothing much to say. You have many API calls hidden behind Use() and Bind() and we don't have the shader at hands. Why do you think the normal map is not loading ? Maybe your lighting calculation is wrong ? How about some error checking ? Does [source lang="cpp"]glGetUniformLocation( _waterShader->GetHandler(),"bumpTex")[/source] actually resolve to a valid value ? [/quote] [quote name='V-man' timestamp='1346812325' post='4976660'] [url="http://www.opengl.org/wiki/GLSL_:_common_mistakes#glGetUniformLocation"]http://www.opengl.or...UniformLocation[/url] and [url="http://www.opengl.org/wiki/GLSL_:_common_mistakes#Enable_Or_Not_To_Enable"]http://www.opengl.or...r_Not_To_Enable[/url] [/quote] I found where the problem was...I used GL_RGBA instead of GL_RGB in glTexImage2D and everyting shew up.. Thank you
  5. Hey guys[img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img] Im working on a water effect demo these days, and there is a problem that the fragment shader cant load the normal texture for the water surface ( the reflection texture works fine) . Im sure that both the vertex shader and fragment shader are correct because they work fine in the ShaderMaker. So I guess the problem comes from my C++ codes, and here are the codes: _waterShader->Use(); glActiveTexture(GL_TEXTURE1); glEnable(GL_TEXTURE_2D); _ReflectionTex->Bind(); glUniform1i( glGetUniformLocation( _waterShader->GetHandler(),"reflectTex"),1); glActiveTexture(GL_TEXTURE2); glEnable(GL_TEXTURE_2D); _WaterNorTex->Bind(); glUniform1i( glGetUniformLocation( _waterShader->GetHandler(),"bumpTex"),2); // uniform values ... // draw a plane ... What's wrong with my codes? [img]http://public.gamedev.net//public/style_emoticons/default/blink.png[/img] sorry for my poor English Thanks!
  6. [quote name='Evil Steve' timestamp='1324570695' post='4896557'] [quote name='50CoL' timestamp='1324565463' post='4896532'] I am sure that I active all rendering context I need before calling any GL function. It's strange that if i call this function out of a class, it works fine.... [/quote] Are you sure you're not creating an instance of the class globally, which will be constructed before your main() function is entered? Have you tried putting a breakpoint on the glGenTexture() call and where you create your rendering context to verify this? [/quote] Thanks for ur help. I did create an instance of that class globally and that's why the function doesn't work. I add a init-function in the class then call it in the main() function, and every thing works fine. Thank to all the guys above.
  7. [img]http://public.gamedev.net/public/style_emoticons/default/blink.gif[/img]Sorry for replying so late guys. I did make a mistake on the code of "sky[5]", and it should be "GLuint &sky[5]"... I was in hurry while typing this post... I am sure that I active all rendering context I need before calling any GL function. It's strange that if i call this function out of a class, it works fine.... [img]http://public.gamedev.net/public/style_emoticons/default/huh.gif[/img]confusing
  8. Hello guys, I got a problem with the method glGenTexture(). Here is the code: GLuint sky[5]; glGenTexture(5,&sky); When I putted these lines in a class's construction function, they didn't work. The values in the array sky[5] are all 0 after the code above being runed. But They supposed to be 0,1,2,3,4 as the indexes of textures right ?