Darkplaces GLSL?

Discuss programming in the QuakeC language.
Post Reply
Mexicouger
Posts: 514
Joined: Sat May 01, 2010 10:12 pm
Contact:

Darkplaces GLSL?

Post by Mexicouger »

Upon reading around, I have read that Darkplaces can have post-processing effects using glsl. I have noticed that in my mod in the console, it has been unloading information to "glsl/default.glsl". I have never really paid any attention until learning about post processing effects(moreso upon reading a thread on here back in 2008 regarding the effects).

My question is, where exactly is glsl/default.glsl being placed? It isn't in my Darkplaces mod folder, or in any of the sub folders. Where else would it possibly place it? Also, is it controllable via QC by commands? Any other information regarding the topic would be very nice so that it is easier to understand.

Responses are appreciated!
Nahuel
Posts: 495
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Re: Darkplaces GLSL?

Post by Nahuel »

hello mexicouger, i use some stuff in darkplaces , but i am using the glsl file of xonotic,
it´s very simple stuff you can done this with csqc , you can download the glsl of xonotic here
https://www.dropbox.com/s/k7n4esh6pt3686m/default.glsl

in this video

http://www.youtube.com/watch?v=xaaujhA8ALI

i use a stat shared betwhen ssqc and cscs called "timeblur", how you can see if slender is near the "timeblur" value is high,

in csqc i used this code

Code: Select all

float timeblurf;
timeblurf = GetStat_FLOAT_TRUNCATED(STAT_TIMEBLUR);


	if(timeblur > 0)
	{
		float f, r, t;

		r = -3;
		f = timeblur * 0.05;
		t = timeblur * 0.05;

		cvar_set("r_glsl_postprocess", "1");
		cvar_set("r_glsl_postprocess_uservec1", strcat(ftos(-t), " ", ftos(f), " 0 0"));

	}

so, glsl stuff is controled by cvar :) also you can get (with this glsl file or the default glsl file) some "cellshading" effects usign different values; check this video
http://www.youtube.com/watch?v=LK7_Wndseno
hi, I am nahuel, I love quake and qc.
Nahuel
Posts: 495
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Re: Darkplaces GLSL?

Post by Nahuel »

Mexicouger wrote:
My question is, where exactly is glsl/default.glsl being placed? It isn't in my Darkplaces mod folder, or in any of the sub folders. !
glsl file must be placed in modfolder/glsl
hi, I am nahuel, I love quake and qc.
Mexicouger
Posts: 514
Joined: Sat May 01, 2010 10:12 pm
Contact:

Re: Darkplaces GLSL?

Post by Mexicouger »

Oh thanks Nahuel! Is there a cvar for every effect you can use? Or how is everything else controlled other than blur? Also, are these controllable via the console then since they are cvars?
Nahuel
Posts: 495
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Re: Darkplaces GLSL?

Post by Nahuel »

Mexicouger wrote:Oh thanks Nahuel! Is there a cvar for every effect you can use? Or how is everything else controlled other than blur? Also, are these controllable via the console then since they are cvars?
you can change the glsl values from console, csqc just update the values in every frame, i called "timeblur" but it´s a fake blur :) just glsl post process efffect, you can see the video , ou can add b/w effects and celll shading via csqc or console (or ssqc but it´s too slow for updates)
hi, I am nahuel, I love quake and qc.
Mexicouger
Posts: 514
Joined: Sat May 01, 2010 10:12 pm
Contact:

Re: Darkplaces GLSL?

Post by Mexicouger »

Hey Nahuel I really appreciate your help! I love learning, and you have made it abundantly easier.

I have a couple more questions if you don't mind though. For starters, when I put in any value in the console, such as r_glsl_postprocess_uservec1 5 10 0 0, I don't get any effect whatsoever(And I have the provided default.glsl and post processing cvar enabled). I have tried various values, and still fail to get any motion blur whatsoever. I also can't seem to figure out how to do saturation. I don't think my graphics card is the problem because it is pretty new(AMD Radeon HD 7000 series). With that in mind, I can't seem to get motion blur to work period. I can't get any of these effects to work.

I have browsed the default.glsl file, and it's understandable to a point, but still trips me up in areas, so troubleshooting my problems with this is fairly difficult. If there is anything you may know that would help, I would greatly appreciate it.
Julius
Posts: 98
Joined: Sun Aug 29, 2010 4:32 pm
Contact:

Re: Darkplaces GLSL?

Post by Julius »

OT but related: http://forums.inside3d.com/viewtopic.php?f=10&t=5207
Anyone willing to help out with that?
Post Reply