Page 2 of 2
Re: GZDoom 1.3.17 final released
Posted: Sat Dec 05, 2009 9:49
by Rachael
Janitor wrote:As a non-programmer, how are shaders useful to me?
like having reflective water, refracting glass walls
[/quote]
Edit by Graf Zahl: Sorry for mangling your post. I accidentally used Edit instead of quote and noticed too late.
Re: GZDoom 1.3.17 final released
Posted: Sat Dec 05, 2009 10:49
by Nash
Are shaders allowed on model textures? So that one could make something like a model with reflections, etc?
EDIT:
Code: Select all
hardwareshader floor4_8
{
shader "shaders/glsl/func_wavex.fp"
speed 1.4
}
I assume this is the process to attach a shader to a texture. Which lump do I place this in?
Re: GZDoom 1.3.17 final released
Posted: Sat Dec 05, 2009 11:10
by Graf Zahl
GLDEFS of course.
Re: GZDoom 1.3.17 final released
Posted: Sat Dec 05, 2009 11:15
by Graf Zahl
SoulPriestess wrote:
like having reflective water, refracting glass walls
Sadly the information at hand won't allow these. I can't pass to the shader what I don't have.
I tihink once some people start experimenting with it some new features may have to be added to the engine but we'll have to wait and see.
Re: GZDoom 1.3.17 final released
Posted: Sat Dec 05, 2009 11:30
by Enjay
The example certainly works but is there anywhere to access documentation on how other user defined shaders might be written? Is the syntax GZdoom specific or can the functions be found elsewhere (eg an OpenGL programmers site or something)?
Re: GZDoom 1.3.17 final released
Posted: Sat Dec 05, 2009 13:22
by Graf Zahl
Enjay wrote: Is the syntax GZdoom specific or can the functions be found elsewhere (eg an OpenGL programmers site or something)?
The syntax is native GLSL.
The specified file is just a subroutine of a much larger program that cannot be replaced so it has to obey certain rules:
- the entry point is a function 'vec4 Process(vec4 color)'
The input is the sector light color, the return value the final color after texture processing.
- Unlike light (to allow for special lighting effects, like the brightmap for example) fog is done outside this function.
- The function must call 'getTexel' with an appropriate texture coordinate to reference the texture (this function performs colormap processing or other things that are needed.)
So this essentially boils down to 2 kinds of effects at the moment: Lighting/Coloring and texture positioning. More will certainly be added later but right now I'll leave this as a playing field for the more experiment-minded users.
Re: GZDoom 1.3.17 final released
Posted: Sat Dec 05, 2009 13:38
by Logan MTM
WOW!
Perfect to make whater! *__*
Re: GZDoom 1.3.17 final released
Posted: Sun Dec 06, 2009 18:58
by Janitor
Could one potentially hijack the code from this to make something useful?:
faking HDR with GLSL
Re: GZDoom 1.3.17 final released
Posted: Sun Dec 06, 2009 20:23
by Graf Zahl
In my opinion that entire idea is nonsense. Any semi-decent card that can use shaders has floating point framebuffer support. And those which don't support floating point buffers are old and weak and irrelevant in the bigger scheme of things. Any such card is already excluded from using shaders anyway in GZDoom for other reasons.
The bigger issue is that Doom doesn't have much that would make HDR useful.
Re: GZDoom 1.3.17 final released
Posted: Mon Dec 07, 2009 10:27
by RaVeN
Graf Zahl, please you our hero, but one suggestion from me its blend animations you can do it?
http://www.youtube.com/watch?v=GHCs9NX7iaM
http://forum.drdteam.org/viewtopic.php?f=30&t=4540
Sorry that i many times post it but no one answer to me
Re: GZDoom 1.3.17 final released
Posted: Mon Dec 07, 2009 10:35
by Graf Zahl
Nagging won't you get any closer to it. I have no immediate plans to add such a feature.
Re: GZDoom 1.3.17 final released
Posted: Mon Dec 07, 2009 10:41
by RaVeN
Sadly, zdoomgl have very nice blend animations, you understand what i talking about? you watching my video?
Re: GZDoom 1.3.17 final released
Posted: Mon Dec 07, 2009 11:30
by Enjay
Graf certainly knows what you are talking about (as do I, I think blended animations can look very cool for some textures/flats). It has even been discussed a few times before. However...
Graf Zahl wrote:I have no immediate plans to add such a feature.
I'd say that covers the current position.