aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/renderer_opengl/gl_rasterizer.h
diff options
context:
space:
mode:
authorSebastian Valle <subv2112@gmail.com>2017-06-11 18:23:47 +0000
committerGitHub <noreply@github.com>2017-06-11 18:23:47 +0000
commit39c7c1f580a1c40a12e65b6c9c65215826e73efb (patch)
tree75a2895b108e5460fee8695ebe5b91dbf59e9af2 /src/video_core/renderer_opengl/gl_rasterizer.h
parent9a8a90b52b4a7254ad73afbd23605516c50c5417 (diff)
parent10906dceec42b1975a7f10abd199678dce692838 (diff)
Merge pull request #2727 from wwylele/spot-light
Fragment lighting: implement spot light
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.h')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.h b/src/video_core/renderer_opengl/gl_rasterizer.h
index a9ad7d660..d9a3e9d1c 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.h
+++ b/src/video_core/renderer_opengl/gl_rasterizer.h
@@ -125,6 +125,7 @@ private:
alignas(16) GLvec3 diffuse;
alignas(16) GLvec3 ambient;
alignas(16) GLvec3 position;
+ alignas(16) GLvec3 spot_direction; // negated
GLfloat dist_atten_bias;
GLfloat dist_atten_scale;
};
@@ -153,7 +154,7 @@ private:
};
static_assert(
- sizeof(UniformData) == 0x3E0,
+ sizeof(UniformData) == 0x460,
"The size of the UniformData structure has changed, update the structure in the shader");
static_assert(sizeof(UniformData) < 16384,
"UniformData structure must be less than 16kb as per the OpenGL spec");
@@ -241,6 +242,9 @@ private:
/// Syncs the specified light's position to match the PICA register
void SyncLightPosition(int light_index);
+ /// Syncs the specified spot light direcition to match the PICA register
+ void SyncLightSpotDirection(int light_index);
+
/// Syncs the specified light's distance attenuation bias to match the PICA register
void SyncLightDistanceAttenuationBias(int light_index);