hmm, DG or antagonist,
so I made a shader that should shade a circle and as it goes out from the center also smoothly go from the set color to the outside color...
however due to the engine making it so that the shader affects only 1 tile, there is not much use for this.
what would be nice is if the engine could make shaders "reach" over tiles (like particles can) so that I could see if my shader works.
if it does work I could see various applications for it, namely:
a) better fade for LOS, ie instead of dimming squares and somewhat blocky, have it dim from the center out smoothly
b) lights (not just the player but spells and terrain could use this, making them more realistic)
shaders (mainly for DG or antagonist)
Moderator: Moderator
-
- Reaper
- Posts: 1535
- Joined: Mon Jan 22, 2007 6:31 pm
- Location: East of the sun, west of the moon
shaders (mainly for DG or antagonist)
Oliphant am I, and I never lie.
Re: shaders (mainly for DG or antagonist)
As I told you shaders apply to textures.
You could have an entity with an additional_display which is bigger than itself and apply a shader on it I guess. Like the trees currently can "bleed" over neighboring tiles.
You could have an entity with an additional_display which is bigger than itself and apply a shader on it I guess. Like the trees currently can "bleed" over neighboring tiles.
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning

-
- Reaper
- Posts: 1535
- Joined: Mon Jan 22, 2007 6:31 pm
- Location: East of the sun, west of the moon
Re: shaders (mainly for DG or antagonist)
hmm, ok, I will try that
(but yeah, I need to work a bit more on mine, I can get it to shade a circle, but not really fade yet)

Oliphant am I, and I never lie.
-
- Higher
- Posts: 71
- Joined: Sun May 23, 2010 9:55 am
Re: shaders (mainly for DG or antagonist)
Actually, I havn't tried it but should be simple.
Remember that you don't just get fragment shaders, you get vertex shaders too.
Just have the vertex shader pull the vertexes outward so the quad renders larger than the tile.
Other alternative is a fullscreen shader effect like DG's red hp warning glow thing.
Remember that you don't just get fragment shaders, you get vertex shaders too.
Just have the vertex shader pull the vertexes outward so the quad renders larger than the tile.
Other alternative is a fullscreen shader effect like DG's red hp warning glow thing.
-
- Reaper
- Posts: 1535
- Joined: Mon Jan 22, 2007 6:31 pm
- Location: East of the sun, west of the moon
Re: shaders (mainly for DG or antagonist)
simple, maybe, but I have never programmed in frag before
(this was my first attempt, and when I looked there are really NO good guides to frag programming online that I could find, if you have a link to any, that would be appreciated
)
Basically that means I am stuck using what other people have coded to write my own code, even though I don't really know what I am doing.


Basically that means I am stuck using what other people have coded to write my own code, even though I don't really know what I am doing.
Oliphant am I, and I never lie.
-
- Higher
- Posts: 71
- Joined: Sun May 23, 2010 9:55 am
Re: shaders (mainly for DG or antagonist)
Well, by frag I mean fragment shader. vert is vertex shader. The LANGUAGE tho is GLSL. PLENTY of guides about that.
If you're on windows, check out RenderMonkey. Its a half-decent GLSL IDE that I use. Not perfect, and not updated in 2-3 years but still does most of what you need it to do.
If you're on windows, check out RenderMonkey. Its a half-decent GLSL IDE that I use. Not perfect, and not updated in 2-3 years but still does most of what you need it to do.