mirror of
https://github.com/ConjureETS/LOG750-LAB2.git
synced 2026-03-24 03:21:19 +00:00
sdfsdfsdfsdf
This commit is contained in:
parent
48e5889f60
commit
31fbcbd9e1
@ -35,7 +35,7 @@ vec4 calcDirLight(vec4 tex, vec3 fPos, vec3 fNorm) {
|
|||||||
// Compute ambient component
|
// Compute ambient component
|
||||||
float amb = 0.2;
|
float amb = 0.2;
|
||||||
|
|
||||||
float mult = 1; //max(0.0, -LightDirection.y);
|
float mult = max(0.0, LightDirection.y);
|
||||||
|
|
||||||
//return vec4(0);
|
//return vec4(0);
|
||||||
return vec4(tex.xyz * (diff + amb + spec) * mult, tex.w);
|
return vec4(tex.xyz * (diff + amb + spec) * mult, tex.w);
|
||||||
|
|||||||
@ -146,7 +146,7 @@ void Viewer::draw()
|
|||||||
camera()->getProjectionMatrix(projectionMatrix);
|
camera()->getProjectionMatrix(projectionMatrix);
|
||||||
camera()->getModelViewMatrix(modelViewMatrix);
|
camera()->getModelViewMatrix(modelViewMatrix);
|
||||||
|
|
||||||
modelViewMatrix.rotate(30,1,0,0);
|
modelViewMatrix.rotate(30,0,1,0);
|
||||||
|
|
||||||
m_program->setUniformValue(m_projMatrixLocation, projectionMatrix);
|
m_program->setUniformValue(m_projMatrixLocation, projectionMatrix);
|
||||||
m_program->setUniformValue(m_mvMatrixLocation, modelViewMatrix);
|
m_program->setUniformValue(m_mvMatrixLocation, modelViewMatrix);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user