added specular, ambient light,...
need to fix the texutre gamma correction, look at the todos
This commit is contained in:
@@ -44,6 +44,8 @@ struct Material {
|
||||
QString name;
|
||||
QOpenGLTexture* texture = Q_NULLPTR;
|
||||
bool transparent = false;
|
||||
float shininess = 80; //TODO: read from file
|
||||
QVector3D specularColor = {1.0,1.0,1.0}; //TODO: read from file
|
||||
};
|
||||
|
||||
class FileInterface : public QObject
|
||||
|
@@ -39,7 +39,9 @@ private:
|
||||
|
||||
struct {
|
||||
QVector3D position = { 1,1,1 };
|
||||
QVector3D intensities = { 1,0.25,0.25 };
|
||||
QVector3D intensities = { 1,1,1 };
|
||||
float attenuationFactor = 0.2f;
|
||||
float ambientCoefficient = 0.005f;
|
||||
} m_light;
|
||||
|
||||
QOpenGLShaderProgram m_program;
|
||||
|
Reference in New Issue
Block a user