Commit Graph

287 Commits (84ab7afd444f37e122e250ac4ca2e922472c42f2)

Author SHA1 Message Date
Alexei Kotov f83a7b711a Don't handle per-vertex normals as tangent space normals 1 year ago
Cody Glassman c53abd870b Merge branch 'waterscatter' into 'master'
Use sun visibility for sunlight scattering (bug #7309)

Closes #7309

See merge request OpenMW/openmw!3478
1 year ago
psi29a ff514df5a1 Merge branch 'distortion' into 'master'
Distortion

See merge request OpenMW/openmw!3536
1 year ago
Alexei Kotov 099c39ae87 Use fallback weather ripple settings (bug #7292) 1 year ago
Cody Glassman 187f63d3d3 support postprocess distortion 1 year ago
Alexei Kotov 93ea9dbc3b Do all lighting calculations in one place, support per-vertex specularity
Force PPL when specular maps are used
1 year ago
Alexei Kotov d1274fd3db Deduplicate lambert calculations, consolidate doLighting 1 year ago
Alexei Kotov 4a96885323 Untangle normals and parallax handling
Move tangent space generation to the vertex shaders
Support diffuse parallax when no normal map is present
Don't use diffuse parallax if there's no diffuse map
Generalize normal-to-view conversion
Rewrite parallax
1 year ago
Alexei Kotov 9c94058727 Support Oblivion parallax setup 1 year ago
jvoisin 60ec894d8a Merge branch 'lightitupbaby' into 'master'
Support point specular lighting (#6188)

Closes #6188

See merge request OpenMW/openmw!3559
1 year ago
Alexei Kotov e1cd5250af Use sun visibility for sunlight scattering (bug #7309) 1 year ago
Zackhasacat 231803c6ea Merge branch 'sunvisibility' into 'master'
Make sun specularity behavior more intuitive (bug #6190)

Closes #6190

See merge request OpenMW/openmw!3535
1 year ago
Alexei Kotov 820fc068d1 Support point specular lighting (#6188)
Fix passing light specular colors with shader lighting methods (with help from wazabear)
1 year ago
Alexei Kotov 12abd30e9f Make sun specularity behavior more intuitive (bug #6190)
Remove sun visibility influence on object specularity
Subdue sun visibility influence on water specularity
1 year ago
Cody Glassman 09928ba265 use a dynamic falloff range for soft effect and use shader flags 1 year ago
AnyOldName3 606a0eea8f Get rid of obsolete comment
The matrix in question was removed by !2682
1 year ago
Petr Mikheev 63d5bd6f8a Apply soft effect to nifs marked with soft effect flag (developed by Cody Glassman) 1 year ago
Alexei Dobrohotov 52a16e0e93 BSEffectShader/NoLighting fixes
Don't hijack BSShader::NoLighting for BSEffectShader functionality
(Fallout meshes break if you use the actual emissive color as a base color)
Don't use falloff for textureless NoLighting objects
Use falloff flag for BSEffectShader
2 years ago
Petr Mikheev 115f1e9800 Fix tree shadows when TreeAnim flag is used 2 years ago
Petr Mikheev 788a4d32aa Handle DoubleSided and TreeAnim flags in BSLightingShaderProperty. 2 years ago
Andrei Kortunov 1be1f72f6c Improve shaders formatting 2 years ago
psi29a b0a129d6e4 Merge branch 'ripples' into 'master'
Implement shader-based water ripples

See merge request OpenMW/openmw!2877
2 years ago
Andrei Kortunov 909e301dc6 Increase distotion level 2 years ago
Andrei Kortunov 295f528f08 Use Allman brackets 2 years ago
Mads Buvik Sandvei e666f36b60 [Multiview] Fix transparent pass and vertex shader 2 years ago
Andrei Kortunov e17281ac67 Implement shader-based water ripples (feature 3537) 2 years ago
Cody Glassman 6a64f352a4 fix shader compilation 2 years ago
psi29a 4faa1bf3e8 Merge branch 'moo-bitch-get-out-my-hay' into 'master'
Don't use FFP-friendly texture image units for shadow maps

Closes #7102

See merge request OpenMW/openmw!2682
2 years ago
Cody Glassman ac4787aeec shade refactor 2 years ago
Alexei Kotov 2de81738c1 Implement the basics of BSEffectShaderProperty 2 years ago
Alexei Kotov 0142caacf7 Use falloff start and stop opacity in NoLighting shader 2 years ago
glassmancody.info e778ffee9b po2 scaling for average luminance 2 years ago
AnyOldName3 0edc8fc77d Don't use FFP-friendly texture image units for shadow maps
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.
2 years ago
glassmancody.info 897ee702d1 move water normal to vfs 2 years ago
glassmancody.info 27fe8d42ae fix pass normals 2 years ago
glassmancody.info 9a4977d334 rain occlusion 2 years ago
florent.teppe 43b0ae1ce7 all debug renders now use the same shader and it works
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
2 years ago
florent.teppe 21971c08ba debug draw shader uses the generic functions
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
2 years ago
florent.teppe bd1bbc0ab8 removes mutex, and uses double buffering to avoid writing on a resource that will be read by the draw thread
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
2 years ago
florent.teppe 2a980ecb50 cleaned some code and fixed some naming issues
Moved debug draw to components, fixed some whitespace issues, added include guard

fixed uniform name, removed old files

Fixes some more whitespace weirdness
2 years ago
florent.teppe 12b3424dd7 initial work to get lines in
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
2 years ago
florent.teppe 76008e1ff8 Multiple shapes to draw
adds wireCube primitive

scale of the command taken into account

shading light is more vertical
2 years ago
florent.teppe 93af569a68 can place a cube at 0,0,0 Useless for now
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
2 years ago
glassmancody.info 02ded8832c temporary fix for artifacts in transparent post-pass 2 years ago
glassmancody.info fd4966f77a temporary fix for auto exposure 2 years ago
Petr Mikheev b3c8c8eb56 Support sky blending in multiview mode 3 years ago
glassmancody.info 89bc756732 tmp_sun_fix 3 years ago
Abdu Sharif c09648c349 Add a missing 0 in fog.glsl 3 years ago
Cody Glassman 03616ae2d3 Fix undeclared shader variable 3 years ago
glassmancody.info 7b958148d0 better fade 3 years ago