GLSL Shaders
What's the best way to go about implementing GLSL shaders with the
Warsow source?
Do they need to be hardcoded in r_program.c or can they be loaded from the game directory? I'm having trouble understanding how it works, when I've used GLSL before it was with the source engine and it was a simple case of compiling the shader and using it as a material. It appears to be more complex within Warsow. Any help appreciated, thanks.
Do they need to be hardcoded in r_program.c or can they be loaded from the game directory? I'm having trouble understanding how it works, when I've used GLSL before it was with the source engine and it was a simple case of compiling the shader and using it as a material. It appears to be more complex within Warsow. Any help appreciated, thanks.
Hold on... GLSL is opengl afaik; the source engine in opengl isn't
out yet?
It uses HLSL, but as far as I understand it's basically the same
thing? But I think the Source Shader Editor's custom code allows
you to import GLSL as well.
In Warsow, all shaders are stored as constant strings in
r_program.c
Each shader can have a number of permutations which are controlled by various bitflags, which are then converted into GLSL preprocessor #defines
It should be fairly simple to implment an external loader for GLSL shaders but I wanted to keep them hardcoded for maliciious reasons :P
Each shader can have a number of permutations which are controlled by various bitflags, which are then converted into GLSL preprocessor #defines
It should be fairly simple to implment an external loader for GLSL shaders but I wanted to keep them hardcoded for maliciious reasons :P
I'm a little confused here, from the GLSL shaders in r_program it
appears to use vertex shaders and fragment shaders. I'm trying to
apply a post process effect to the whole screen (as if it was one
2d flat image), excluding the HUD/crosshair. How should I go about
doing this?
Edit: From what I remember (from HLSL), it's something about rendering the full screen to a quad and applying the effect to that? No idea how I'd go about doing this though. Is there anything in place already to make it simpler?
(updated 2012-09-10 23:02:31)
Edit: From what I remember (from HLSL), it's something about rendering the full screen to a quad and applying the effect to that? No idea how I'd go about doing this though. Is there anything in place already to make it simpler?
(updated 2012-09-10 23:02:31)
No, there's no builtin framework for that. You'll have to exactly
the way you described: render the screen to a framebuffer with
texture attached and then render a quad with your special fx
applied (utilizing your custom program from r_program.c)
I'm still having difficulty with this. I sort of understand the
general process and I've read up about some shaders and opengl etc
but I haven't been able to get it to work myself.
Is someone willing to help out with this? I think I've given it the best attempt I can and I don't seem to be getting anywhere. I don't really have a background in coding and this specific task isn't the main part of the project I'm working on, so really I'm looking for a quick solution.
Or maybe if someone can describe the process in a specific way (what/where things would need to be added) so I have a better idea?
Thanks for any help & the help so far.
Is someone willing to help out with this? I think I've given it the best attempt I can and I don't seem to be getting anywhere. I don't really have a background in coding and this specific task isn't the main part of the project I'm working on, so really I'm looking for a quick solution.
Or maybe if someone can describe the process in a specific way (what/where things would need to be added) so I have a better idea?
Thanks for any help & the help so far.
I've been doing a little work with GLSL in the Qfusion engine. I'll
be around this weekend in #warsow.na on quakenet if you need a
second pair of eyes.
#warsow at irc.quakenet.org was the best way to connect with the
developers.
(updated 2012-09-28 21:27:30)
(updated 2012-09-28 21:27:30)
adem wrote:
#warsow at irc.quakenet.org is the best way to connect with the developers.
Not really.. no devs left there :]
fixed:
(updated 2012-09-28 21:28:12)
adem wrote:
#warsow at irc.quakenet.org was the best way to connect with the developers.
(updated 2012-09-28 21:28:12)

