Commit Graph

16 Commits

Author SHA1 Message Date
Christoph Oelckers 9d1dbf4eab - fixed: FBufferedUniform1f didn'T work because it used an int as its buffered value. 2014-06-29 14:08:44 +02:00
Christoph Oelckers ffcb6cb70a - added second vertex coordinate attribute for model interpolation. 2014-06-29 11:00:21 +02:00
Christoph Oelckers 39775cc904 - mystery of desaturation shader solved: The old code passed '1-desaturation' to the shader, the new code 'desaturation', so for the 'mix' function to work its arguments must be swapped. 2014-05-21 15:25:25 +02:00
Christoph Oelckers 54425ee2ef - fixed: Desaturation factor was applied incorrectly.
- Also fixed some very strange thing in the shader's desaturate function. For unknown reasons using the 'mix' function there did not work.
- fixed: The fog boundary special shader could not be used.
2014-05-21 13:40:46 +02:00
Christoph Oelckers cf45f2d718 - added missing shader files. 2014-05-12 22:24:26 +02:00
Christoph Oelckers 4d005bdfa0 shader rework
All those special shaders have been merged together.
Mostly working but the non-shader lighting seems a bit broken.
2014-05-12 14:45:41 +02:00
Christoph Oelckers b9a6fe80a4 Do not use the shader to handle STYLEF_RedIsAlpha.
Turns out that the name doesn't accurately describe what it does.
It is correct for images that come with their own palette or are true color.
But for images using the game palette it doesn't use the red channel to determine translucency but the palette index! Ugh...

This means it cannot be done with a simple operation in the shader because it won't get a proper source image. The only solution is to create a separate texture.
2014-05-11 23:56:53 +02:00
Christoph Oelckers 7793bbbcc9 Further cleanup of lighting code.
- remove thing color from lighting calculations.
- implement alpha textures and inverse sprites for infrared as texture modes. This still requires some handling for the alpha texture mode for non-shader rendering because there is no way in the fixed pipeline to do it. The inverted texture effect can be done with a texture combiner.
- fixed: ThingColor for sprites was set in the wrong place. It must be in the Process function, not in the lighting calculation.
- added functions for isolated calculation of sprites' dynlight color.
2014-05-11 17:56:38 +02:00
Christoph Oelckers 52056a05bd - changed handling of DynLight in shader to serve as a global dynamic light color for all lighting modes. 2014-05-11 16:49:17 +02:00
Christoph Oelckers 53f4cd0108 - added objectcolor uniform. This will be used to hold the thingcolor for shader based rendering. 2014-05-11 16:06:25 +02:00
Christoph Oelckers 09f4071436 Ok, it had to be done: Removed shader support for pre GLSL 1.3/GL 3.0 hardware. The compromises needed to accomodate these are just too bad and would block any attempt at streamlining the code. 2014-05-11 13:27:51 +02:00
Christoph Oelckers b09405a8bd - changed rendering of glowing walls so that it doesn't require an additional vertex attribute, just pass the floor and ceiling planes as uniforms. 2014-05-10 17:09:43 +02:00
Christoph Oelckers fd767233aa - fixed typo: glColor must be gl_Color in shader. 2013-12-08 10:01:03 +01:00
Christoph Oelckers d46315c44b - some finetuning of subtractive effect. 2013-12-05 15:39:46 +01:00
Christoph Oelckers 95163e378e - added a fog layer when drawing sprites with render style reverse subtract. 2013-12-05 15:06:10 +01:00
Christoph Oelckers e00847f64b - GZDoom solution file
- missing GL resources for gzdoom.pk3.
2013-06-23 11:13:01 +02:00