• 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.
Sign in to follow this  
Followers 0
Chapa

Domain vs Geomtry Shader

7 posts in this topic

Hi, first sorry for my poor english,but here it goes, i recently started with tessellation shaders, to be able to render a big terrain with easy culling and LOD implementation, but im facing some issues, right now this is what i am doing:

 

1.- Draw call of a flat mesh of X*X quads.

2.- Vertex shader does nothing, it only sends the information to the hull shader.

3.- Hull shader gets a tessellation factor depending on distance and it also does frustrum culling checking if the vertex is inside the frustrum.

4.- Domain shader uses a displacement map (heightmap) to move the new vertices to its "y" position.

 

I still need to calculate normals, tangents and binormals or bitangents however you call them, to be able to apply lighting on the pixel shader, and i also want to implement backface culing and may be occlusion culling using normals.

 

I tried adding a geometry shader stage, which right now is doing nothing but passing the information to the pixel shader, no calculations, but this still makes a big drop on the fps, i dont want to think what will happend if i add the normal calculations there.

 

Im not sure what should i do, or what am i doing wrong, should i calculate normals on domain shader, geometry shader, or which should be a nice solution, thank you.

0

Share this post


Link to post
Share on other sites

@phantom: what i tried to say, is that each frame is taking longer time to render.

 

@spazzarama: thanks for your answer, it makes sense what you said about domain shader always will be called, but geometry is still optional, so i guess when using tess, geometry is not needed anymore like for nothing lol, thanks for the code examples too.

0

Share this post


Link to post
Share on other sites

@phantom: what i tried to say, is that each frame is taking longer time to render.


Well, yes, that is to be expected because you've activated an extra stage in the pipeline - my question was because fps drops are non-linear so you could be worrying over very little.
0

Share this post


Link to post
Share on other sites


Well, yes, that is to be expected because you've activated an extra stage in the pipeline - my question was because fps drops are non-linear so you could be worrying over very little.

 

Well right now still with no normal calculations and that stuff im like at 300 fps, and adding the geometry stage doing almost nothing, it goes down to like 50 fps, i know fps are algorithmic and that stuff, but it is still alot to consider removing that stage definetly, thank you.

 

Now going back to spazzarama answer, i will be doing the new normal calculations on the domain shader, but now that i started thinking on how to do them, it is not possible to do smooth normals since i dont have access to adjency vertices, so i started looking for some information on how to do it, a lot of people tell me to use a "sobel map", but i have no idea on how to make it or use it, any ideas?

0

Share this post


Link to post
Share on other sites

There's a GameDev post here about generating a normal map from a height map that I guess is along the lines of what you are after. If the height map is static you could just precalculate this before hand. Otherwise since you're in DX11 you could use a compute shader to perform the sobel edge detection (got an example of that in my book somewhere too if you get stuck), otherwise something along the lines of the linked post should get you going.

0

Share this post


Link to post
Share on other sites


so i guess when using tess, geometry is not needed anymore like for nothing lol

 

Geometry shader can still be useful for doing dual-paraboloid or cube environment mapping

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0