This more-or-less gets rid of the shadow system's only depencency on FFP
stuff. All that remains is it using OSG cameras, which OSG provides a
uniform-based implementation of, too, which we can trivially migrate to.
This should mean we're not eating any of the ~8 FPP-friendly texture
units, which is good as Morrowind models can use all of those on their
(although they very rarely do), and instead use some of the ~160
shader-only texture image units. This just requires not calling
glEnable(GL_TEXTURE_2D), accomplished by changing
setTextureAttributeAndModes to setTextureAttribute.
Also changes from using glTexGen and its eye plane matrices to pass the
shadow space matrix for each light to explicit uniforms. Thankfully, the
maths was a simple combination of the valid region matrix and eye plane
matrix maths.
As of this commit, I believe this kills shadows in one eye for stereo
rendering.
remove debug draw shader, now that debug and debugdraw serve the same function
remove debug draw code from actors to clean
replaced int uniforms with bool for better readability
clang format
cleanup, remove unused func, and mistake whitespace
fix namespace
added more colors
fixed missing whitespace
renamed files
roundabout way to change case with windows noticing
fixed type
fix filename in cmakelist.txt
ported shader and c++ code so glsl 120 can be used instead of 330
new debug shader and old one are almost unified
for some reason, even though I get no compilation issue, old debug draws don't work, only the new one implemented by this MR
remove useless const cast
changes when the buffers are reset -> at the end of the draw, because that's when we are certain the data isn't needed anymore
removed useless variable
fixed typo
include osg::vec3 instead of osg vec3f
compile linux
compile ?
applied clang format to the new files
Moved debug draw to components, fixed some whitespace issues, added include guard
fixed uniform name, removed old files
Fixes some more whitespace weirdness
lines need the same synchronisation system as the other primitives
This two points are there because if I resize to 0 it crashes, si I need a pice of line at 0.,0.,0. so there is no crash.Not ideal
Lines are colored
didn't commit updated shader file
Arbitrarly draw cubes at certain position with a certain color
Adds exemple of how it looks in the actor update code.
draws a green cube if alive, red else
Multiview shaders.
Refactor Frustum management
Rewrite shared shadow map
cull mask should respect stereo
Stereo savegame screencap
LocalMap refactoring
use the vertex buffer hint instead of the display list patch to enable/disable display lists
Character preview fixes
With this PR we test out osg's shader define system for a somewhat harmless feature. As we can see, our code becomes more concise and efficient in this case. Most importantly, we no longer create unneeded vertex shader objects.
Fixes a regression in which pass lighting was clamped after being passed
to fragment shader. For correct FFP emulation, we need to clamp the result
in vertex shader. When clamping after interpolation, negative lights in
particular have a much more drastic effect.