[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - Custom Glsl for darkplaces

Custom Glsl for darkplaces

Discuss programming topics that involve the OpenGL API.

Moderator: InsideQC Admins

Custom Glsl for darkplaces

Postby Nahuel » Tue Oct 11, 2011 3:43 pm

Hello !! Currently i am experimenting with glsl for darkplaces. I know that i can custom the glsl shaders. I have many questions about this :) but now i ask how can i achieve this??

What is the process to achieve this shader??
Thanks in advance :)
hi, I am nahuel, I love quake and qc.
User avatar
Nahuel
 
Posts: 495
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Re: Custom Glsl for darkplaces

Postby leileilol » Tue Oct 11, 2011 5:47 pm

First you'll have to dump the glsl shader file out of Darkplaces while running it. There's a console command that does it, r_glsl_dumpshader


Then, you examine this newly dumped default.glsl file in your gamedir/glsl folder with notepad or editpad++ or whatever

Scroll down to "#ifdef USEPOSTPROCESSING"


You'll see an example of a blur postprocess effect. Evidently this is where you will begin
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: Custom Glsl for darkplaces

Postby Nahuel » Tue Oct 11, 2011 6:20 pm

hi, I am nahuel, I love quake and qc.
User avatar
Nahuel
 
Posts: 495
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Re: Custom Glsl for darkplaces

Postby mh » Tue Oct 11, 2011 8:42 pm

User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: Custom Glsl for darkplaces

Postby Nahuel » Tue Oct 11, 2011 8:57 pm

hi, I am nahuel, I love quake and qc.
User avatar
Nahuel
 
Posts: 495
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Re: Custom Glsl for darkplaces

Postby Spike » Tue Oct 11, 2011 9:46 pm

with windows, even if you're the admin, you don't have admin rights unless you click the 'yes I want to allow this program to screw over my machine' button in the uac prompts, so admin or not, you don't have write access.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Custom Glsl for darkplaces

Postby mh » Tue Oct 11, 2011 11:14 pm

And even if you are the admin and have set everything up correctly (e.g. by modifying the security on your Quake folder) you still should use My Documents for full compatibility. I know that there are valid reasons to want to not use it sometimes, so it's a balancing act.
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: Custom Glsl for darkplaces

Postby toneddu2000 » Sat Jul 07, 2012 10:35 am

Sorry guys to resume this very old thread but maybe you experienced programmers know well how to create glsl effects in DP, but honestly I can't even understand which files are involved in the process! :)
ok:
1) I dump the shader with the r_glsl_dumpshader command. The shader is in my glsl folder. correct
2) I open the default.glsl and I write my own glsl code in this file(or I should create a new file with my new effect, like foo.glsl ?). Then?

How can I "load" that effect? In quakec? Via console with the stuffcmd command?
Really I can't find any clues online

Thanks you guys
- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: Custom Glsl for darkplaces

Postby Spike » Sat Jul 07, 2012 11:57 am

darkplaces' default.cfg overrides every single surface unconditionally. You don't have a choice to do it per-surface unless you can either figure out some way to use a permutation only for your entity of your choice, or arrange for some testable condition via the colormod field or something and depend upon dynamic branching.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Custom Glsl for darkplaces

Postby toneddu2000 » Sat Jul 07, 2012 5:08 pm

for "default.cfg" did you mean default.cfg in the data folder or default.glsl?
- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: Custom Glsl for darkplaces

Postby Spike » Sat Jul 07, 2012 5:21 pm

default.glsl sorry.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Custom Glsl for darkplaces

Postby toneddu2000 » Sat Jul 07, 2012 10:36 pm

ah,ok. So if I understood correctly,once the default.glsl is loaded the effect/s are always "active" so there isn't a way to enable/disable it?
- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: Custom Glsl for darkplaces

Postby Spike » Sun Jul 08, 2012 2:03 am

there's always dynamic branching, using something like colormod or some such.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Custom Glsl for darkplaces

Postby toneddu2000 » Mon Jul 09, 2012 9:37 pm

I don't know what colormod is, but I tried Sunday to add a new glsl cvar in DP and in the next days I'll try to add GLSL code to it. If I have success I'll post tests in this thread
- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy


Return to OpenGL Programming

Who is online

Users browsing this forum: No registered users and 1 guest