Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cartoon shader always active command?

#1
The cartoon shader that turns on when picking up the quad powerup (on some maps) is really gorgeous, and I was wondering if there was a way to enable the effect permanently, or at least until toggled with a similar command. Here are some screenshots of the effect in question, both before and after picking up the powerup for clarity:

http://postimg.org/gallery/8wp9psa/

I'm not sure if this is related to the "Psyko effects" but if it is, can anyone explain how to enable it? I'd love to play like this.
Reply

#2
I remember you've asked this before, and that thread was merged into the big questions thread (link).

Anyway, I'm afraid you're probably not meant to set that effect manually. While it is indeed controlled by configuration variables, CSQC still constantly manipulates them, and it will turn it off as soon as you turn it on. The code is a bit clunky in that respect...

The code that enables post-processing when you have strength is in qcsrc/client/View.qc, in the big CSQC_UpdateView function. Here's the relevant section in the current revision of the code in the master branch: link.

What this does is set r_glsl_postprocess_uservec2_enable to 1, and set the first two of the four components of the r_glsl_postprocess_uservec2 vector to values that depend on the time left on the strength and the value of the hud_powerup cvar.

What *might* work to work around the code is to set hud_postprocessing to 0 and r_glsl_postprocess to 1, then set r_glsl_postprocess_uservec2_enable to 1 and r_glsl_postprocess_uservec2 to for example "0.5 -2.5 0 0" (which I believe is the default maximum intensity, which then fades out linearly to "0 0 0 0" with time in the last 5 seconds of the effect). You might need to set r_glsl_uservec1_enable to 1 and fiddle with r_glsl_uservec1. That uservec controls the blur. (See the glsl shader file in the darkplaces tree; copypaste the url below, the forum has trouble parsing it...)

Code:
http://git.xonotic.org/?p=xonotic/darkplaces.git;a=blob;f=shader_glsl.h;h=b8a441b0a4c3b5fd96761ff80c69d2a3
16ad1d87;hb=HEAD#l252
[Image:http://i.imgur.com/4XODR.png]640K ought to be enough for anybody.
     ― Linux Torvalds
Reply

#3
(06-08-2013, 04:49 PM)Mr. Bougo Wrote: I remember you've asked this before, and that thread was merged into the big questions thread (link).

Anyway, I'm afraid you're probably not meant to set that effect manually. While it is indeed controlled by configuration variables, CSQC still constantly manipulates them, and it will turn it off as soon as you turn it on. The code is a bit clunky in that respect...

The code that enables post-processing when you have strength is in qcsrc/client/View.qc, in the big CSQC_UpdateView function. Here's the relevant section in the current revision of the code in the master branch: link.

What this does is set r_glsl_postprocess_uservec2_enable to 1, and set the first two of the four components of the r_glsl_postprocess_uservec2 vector to values that depend on the time left on the strength and the value of the hud_powerup cvar.

What *might* work to work around the code is to set hud_postprocessing to 0 and r_glsl_postprocess to 1, then set r_glsl_postprocess_uservec2_enable to 1 and r_glsl_postprocess_uservec2 to for example "0.5 -2.5 0 0" (which I believe is the default maximum intensity, which then fades out linearly to "0 0 0 0" with time in the last 5 seconds of the effect). You might need to set r_glsl_uservec1_enable to 1 and fiddle with r_glsl_uservec1. That uservec controls the blur. (See the glsl shader file in the darkplaces tree; copypaste the url below, the forum has trouble parsing it...)

Code:
http://git.xonotic.org/?p=xonotic/darkplaces.git;a=blob;f=shader_glsl.h;h=b8a441b0a4c3b5fd96761ff80c69d2a3
16ad1d87;hb=HEAD#l252

Okay, it makes sense that it couldn't be controlled if it's constantly modified, but thank you for answering. I might try that idea, too, though.
Reply

#4
Hi there !

I would be interested in knowing if you find a solution to achieve this, i'm looking for putting this effect too...
Reply

#5
Rerem, please read my post above. I propose a set of cvars that might work, please give it a try.
[Image:http://i.imgur.com/4XODR.png]640K ought to be enough for anybody.
     ― Linux Torvalds
Reply

#6
Alright, i tried that and it works fine, thanks Smile
Reply



Possibly Related Threads...
Thread Author Replies Views Last Post
  command and cvar lookup tool (cacs) -z- 5 5,186 04-08-2015, 06:07 AM
Last Post: Antibody

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-