]> git.tdb.fi Git - libs/gl.git/commit
Redesign the material system
authorMikko Rasa <tdb@tdb.fi>
Wed, 3 Jun 2020 18:56:00 +0000 (21:56 +0300)
committerMikko Rasa <tdb@tdb.fi>
Thu, 11 Jun 2020 15:38:43 +0000 (18:38 +0300)
commit3500f13f51dabadd2e7f06b81820936520cc8115
tree9f1bcf459c4ab525741cd0879ac31988151b4743
parent5ee6399ae7d274a9c78701d79c730f3dd7145812
Redesign the material system

Now that legacy OpenGL support is removed and all lighting calculations
are done in shaders, there's no reason to stick to the old material model
anymore.  The new model is closer to that used by many 3D modeling
programs, with textures applied to material properties.  It also allows
different types of materials with different shading models.

This change breaks source compatibility, but the new BasicMaterial class
is mostly compatible with the old Material class, with only minor changes
needed in code and datafiles.
shaderlib/msp_interface.glsl
shaderlib/singlepass.glsl
source/basicmaterial.cpp [new file with mode: 0644]
source/basicmaterial.h [new file with mode: 0644]
source/material.cpp
source/material.h
source/renderpass.cpp
source/renderpass.h
source/resources.cpp
source/resources.h