How do I get the shaders to work - Printable Version +- Colobot Forum - International Colobot Community (https://colobot.info/forum) +-- Forum: [Archive] New forum (2015-2019) (https://colobot.info/forum/forumdisplay.php?fid=76) +--- Forum: Colobot: Gold Edition Basics (https://colobot.info/forum/forumdisplay.php?fid=58) +---- Forum: Help (https://colobot.info/forum/forumdisplay.php?fid=61) +---- Thread: How do I get the shaders to work (/showthread.php?tid=628) Pages:
1
2
|
How do I get the shaders to work - PracticeBot13 - 06-27-2015 I just downloaded the newest Colobot: Gold Edition Alpha, and I don't know how to get the newly added shaders to work. Is it because of my graphics card? I have an Intel HD Graphics driver on my laptop. RE: How do I get the shaders to work - tomangelo - 06-27-2015 Shaders are available for new graphic engines. You need to enable one of them, by running the game with an argument '-graphics gl21', or '-graphics gl33'. edit: Sorry, I've made a mistake. It's '-graphics glxx' instead of '-opengl xx' RE: How do I get the shaders to work - PracticeBot13 - 06-28-2015 (06-27-2015, 11:52 AM)tomangelo Wrote: Shaders are available for new graphic engines. You need to enable one of them, by running the game with an argument '-graphics gl21', or '-graphics gl33'. I'll try that soon. Thanks for the suggestion. RE: How do I get the shaders to work - PracticeBot13 - 06-28-2015 (06-27-2015, 11:52 AM)tomangelo Wrote: Shaders are available for new graphic engines. You need to enable one of them, by running the game with an argument '-graphics gl21', or '-graphics gl33'. I can't do it. I always get an error message when I put the command line in. RE: How do I get the shaders to work - tomangelo - 06-28-2015 What is this error? RE: How do I get the shaders to work - PracticeBot13 - 06-29-2015 (06-28-2015, 11:30 PM)tomangelo Wrote: What is this error? could not read from data directory: './data' RE: How do I get the shaders to work - krzys_h - 06-29-2015 Looks like the working directory is wrong. If you are running the game from the command line, do 'cd "colobot-installation directory"' first RE: How do I get the shaders to work - PracticeBot13 - 06-29-2015 (06-29-2015, 07:00 AM)krzys_h Wrote: Looks like the working directory is wrong. If you are running the game from the command line, do 'cd "colobot-installation directory"' first didn't work. i'm gonna need a more detailed guide on how i can get these shaders up & running. RE: How do I get the shaders to work - tomaszkax86 - 06-29-2015 Directory structure should be as follows: Code: Your-colobot-directory And you run Colobot using switch: Code: colobot.exe -graphics ### Where ### is one of available graphics engines: opengl -- OpenGL 1.4 engine (default) gl21 -- OpenGL 2.1 engine gl33 -- OpenGL 3.3 engine auto -- automatically determines best available engine (added in dev branch) RE: How do I get the shaders to work - PracticeBot13 - 06-30-2015 (06-29-2015, 02:07 PM)tomaszkax86 Wrote: Directory structure should be as follows:OK. I've finally got it. RE: How do I get the shaders to work - PracticeBot13 - 07-28-2015 although i did manage to get colobot running through the command line, i still need to find out how i can get the shaders to work. how do i enable them? RE: How do I get the shaders to work - tomaszkax86 - 07-28-2015 You enable shaders by using ether OpenGL 2.1 or OpenGL 3.3 engine. RE: How do I get the shaders to work - PracticeBot13 - 08-07-2015 (07-28-2015, 10:00 AM)tomaszkax86 Wrote: You enable shaders by using ether OpenGL 2.1 or OpenGL 3.3 engine. I put in the code in command prompt, but the shaders still won't function. RE: How do I get the shaders to work - tomaszkax86 - 08-07-2015 What kind of error do you have this time? If game runs fine on gl21 or gl33 graphics engine, then shaders are working. RE: How do I get the shaders to work - PracticeBot13 - 08-13-2015 (08-07-2015, 12:37 PM)tomaszkax86 Wrote: What kind of error do you have this time? If game runs fine on gl21 or gl33 graphics engine, then shaders are working. There is no error displayed. I run the game with the command line and it works like normal but the shaders aren't working. RE: How do I get the shaders to work - tomaszkax86 - 08-13-2015 (08-13-2015, 10:25 AM)PracticeBot13 Wrote:(08-07-2015, 12:37 PM)tomaszkax86 Wrote: What kind of error do you have this time? If game runs fine on gl21 or gl33 graphics engine, then shaders are working. Check the logs, if you use -graphics gl21 you should see a line: Code: [INFO]: Creating CDevice - OpenGL 2.1 With -graphics gl33 you should see a line: Code: [INFO]: Creating CDevice - OpenGL 3.3 If they are initialized properly and no errors occur, then shaders are working. These engines use shaders for all rendering so there's no way shaders are not working when you see UI and everything. I honestly don't know what you're expecting. RE: How do I get the shaders to work - CHmSID - 08-13-2015 (08-13-2015, 11:53 AM)tomaszkax86 Wrote: I honestly don't know what you're expecting.Special effects and such xD When I was first getting into modern opengl I was disappointed how mundane the shaders are. I used to think it's all about post processing(night vision, static noise etc), now I know shaders are used for such boring things as positioning entities The occasional post-process effect is the cream at the top of the whole pipeline. RE: How do I get the shaders to work - tomaszkax86 - 08-13-2015 (08-13-2015, 02:01 PM)CHmSID Wrote:(08-13-2015, 11:53 AM)tomaszkax86 Wrote: I honestly don't know what you're expecting.Special effects and such xD Colobot doesn't have any post-processing effects and for now doesn't need any. I added mipmapped texturing, anisotropic filtering, MSAA and dynamic shadows to the game and it feels rather heavy. Rendering needs to be optimized in the future. Shaders are more than just boring positioning of entities. But it's unlikely you can find interesting examples on the Internet. People post rather mundane stuff. So here's something I was doing in OpenGL 3.3: stereoscopic rendering using geometry shaders and array textures. Rather than rendering entire world twice, you setup array textures to store 2 screens. Geometry shader duplicates geometry, one part uses left camera, other part uses right camera. Fragments are output to their own layers within array textures and that gives you 2 rendered scenes from two different cameras. Code: // VERTEX SHADER After that you can do whatever you want with the result. Below is the code that creates red-cyan anaglyph for use with simple 3D glasses. Code: // VERTEX SHADER This can be easily combined with deferred rendering and make it even better. PS. We can implement red-cyan anaglyph rendering in Colobot. It doesn't require too much work, although it wouldn't be as optimized as in my example. RE: How do I get the shaders to work - RaptorParkowsky - 08-13-2015 (08-13-2015, 05:05 PM)tomaszkax86 Wrote: PS. We can implement red-cyan anaglyph rendering in Colobot. It doesn't require too much work, although it wouldn't be as optimized as in my example.I agree and want . I hope this will work with minimum OpenGL 1.4. Why OpenGL 2.1 is so slow and unstable? Is that because of amount of the lights in the scene? RE: How do I get the shaders to work - CHmSID - 08-13-2015 I never played with extensions, but shaders are only natively available in Opengl 2.1+ So if there are no such extensions, implementing this in pure VBOs could prove to be too slow(It's definitely doable though). On the other hand the worst case scenario for this effect would be that the screen is drawn twice. Which could not be a big deal for low graphics Colobot. |