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

Using shaders vs fixed pipline

7 posts in this topic

Hey,

when I wanted to implement texture splatting for the terrain in my game, I found a post, wich suggested using shaders.
Since I had nearly no experience with shaders until then, I thought it would be nice to learn more about them.
I implemented a simple shader and noticed that the lighting wasn´t there anymore. It looks like one has to program lighting, fog and all that stuff [i]again oneself[/i] in the new shader. Is that true?

It would be nice if I just could change the texturing for example and leave the lighting as it is in the standard pipeline.

The only thing I want to do is a nice transition between two or three textures. I know it is possible to do this with the fixed pipeline as well, but I also heard about shaders being much faster doing this. Can I use shaders AND the functionality of the default fixed pipeline or do I have to either do it without shaders or program this functionality myself?

thanks in advance
0

Share this post


Link to post
Share on other sites
for each object you need to choose between rendering by shaders or fixed pipeline.
for example you can use shaders for the terrain, but render everything else using the fixed pipeline.
however shaders give you much greater flexibility, and new features (because of programmability).
generally it is only advisable to use fixed pipeline when the given hardware (and driver) can't handle shaders.

and yes, you need to reimplement the fixed function pipeline in the shaders if you want those effects (ie. lighting). Edited by Yours3!f
2

Share this post


Link to post
Share on other sites
thanks,
Although I see the advantage of having more features with shaders, to me it looks like they are a ton of work:
Currently I´m using lighting with the fixed pipeline and it works quite well. Of course one could improve it, but for me it works fine. But when I want to change something (like programming texture splatting) and I choose to use shaders, I have to reprogram the whole lighting again!
Is there anywhere anything like a "default shader" that can just be modified?

[b]IF[/b] I have to program light and fog by myself again, I´d really prefer to focus on other issues rather than reimplementing existing features...
0

Share this post


Link to post
Share on other sites
actually, once you know how to use shaders, it's the fixed pipeline that's more work
but, i would just make a decision and stick with it
if you are going to work on your project for a long(er) time, then start using shaders right now
you'll get stuck on things for a while, and at some point you'll just "get it", and suddenly fixed pipeline isn't so good anymore =)
i know i did.. i did lots of funny things in my shaders.. now it's all good
if you stick a #version 130 tag on top of your shader, you can use both new and old shader terminology to get you started,
and if you have nvidia card it will force itself to compile using GLSL rules and not mix in Cg, so its almost guaranteed to work on ATI
2

Share this post


Link to post
Share on other sites
Shaders *ARE* more work. However, that isn't a bad thing, necessarily. Even if you are doing some really cool effect with a shader, 90% of the shader code will be the same as any other shader. Write some lighting, texturing, shadow and other shaders and then copy and paste as needed. No point is retyping.
1

Share this post


Link to post
Share on other sites
ok, thanks for all the replies.
I actually am working on the project for a pretty long time now, but switching still may be worth it.
So I decided to learn more about shaders and program two or three and probably I will stick with them.
"Master of my own lighting" sounds very good, but I´d rather like to focus on features for the gameplay[img]http://public.gamedev.net//public/style_emoticons/default/wink.png[/img]

Even if I don´t use it in this project in the end, I hope it at least will be worth the experience.
0

Share this post


Link to post
Share on other sites
[quote name='m41q' timestamp='1350168547' post='4989909']
ok, thanks for all the replies.
I actually am working on the project for a pretty long time now, but switching still may be worth it.
So I decided to learn more about shaders and program two or three and probably I will stick with them.
"Master of my own lighting" sounds very good, but I´d rather like to focus on features for the gameplay[img]http://public.gamedev.net//public/style_emoticons/default/wink.png[/img]

Even if I don´t use it in this project in the end, I hope it at least will be worth the experience.
[/quote]

here's a cg implementation of the whole OpenGL fixed function pipeline. Cg is very similar to GLSL so you should have no problem porting it after you learned a bit of GLSL.
http://www.codesampler.com/source/ogl_cg_fixed_function.zip
1

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